1
# Copyright 2011 Canonical Ltd. This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
4
"""Interfaces for the Launchpad security policy."""
12
from zope.interface import Interface
15
class IAuthorization(Interface):
16
"""Authorization policy for a particular object and permission."""
18
def checkUnauthenticated():
19
"""Returns True if an unauthenticated user has that permission
20
on the adapted object. Otherwise returns False.
23
def checkAccountAuthenticated(account):
24
"""Returns True if the account has that permission on the adapted
25
object. Otherwise returns False.
27
The argument `account` is the account who is authenticated.