~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/interfaces/archive.py

[rs=buildbot-poller] automatic merge from stable. Revisions: 11051,
        11052, 11053, 11054, 11055, 11056, 11057 included.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
# pylint: disable-msg=E0211,E0213
629
629
        :return The new `IPackageCopyRequest`
630
630
        """
631
631
 
632
 
    # XXX: noodles 2009-03-02 bug=336779: This should be moved into
633
 
    # IArchiveView once the archive permissions are updated to grant
634
 
    # IArchiveView to archive subscribers.
635
 
    def newAuthToken(person, token=None, date_created=None):
636
 
        """Create a new authorisation token.
637
 
 
638
 
        XXX: noodles 2009-03-12 bug=341600 This method should not be exposed
639
 
        through the API as we do not yet check that the callsite has
640
 
        launchpad.Edit on the person.
641
 
 
642
 
        :param person: An IPerson whom this token is for
643
 
        :param token: Optional unicode text to use as the token. One will be
644
 
            generated if not given
645
 
        :param date_created: Optional, defaults to now
646
 
 
647
 
        :return: A new IArchiveAuthToken
648
 
        """
649
 
 
650
632
    @operation_parameters(
651
633
        person=Reference(schema=IPerson),
652
634
        # Really IPackageset, corrected in _schema_circular_imports to avoid
1112
1094
        :return: A dictionary of filenames and SHA1s.
1113
1095
        """
1114
1096
 
 
1097
    def getAuthToken(person):
 
1098
        """Returns an IArchiveAuthToken for the archive in question for
 
1099
        IPerson provided.
 
1100
 
 
1101
        :return: A IArchiveAuthToken, or None if the user has none.
 
1102
        """
 
1103
 
 
1104
    def newAuthToken(person, token=None, date_created=None):
 
1105
        """Create a new authorisation token.
 
1106
 
 
1107
        :param person: An IPerson whom this token is for
 
1108
        :param token: Optional unicode text to use as the token. One will be
 
1109
            generated if not given
 
1110
        :param date_created: Optional, defaults to now
 
1111
 
 
1112
        :return: A new IArchiveAuthToken
 
1113
        """
 
1114
 
 
1115
    @call_with(person=REQUEST_USER)
 
1116
    @export_write_operation()
 
1117
    def getPrivateSourcesList(person):
 
1118
        """Get a text line that is suitable to be used for a sources.list
 
1119
        entry.
 
1120
 
 
1121
        It will create a new IArchiveAuthToken if one doesn't already exist.
 
1122
        """
 
1123
 
1115
1124
class IArchiveAppend(Interface):
1116
1125
    """Archive interface for operations restricted by append privilege."""
1117
1126