Did I find the right examples for you? yes no

All Samples(14)  |  Call(12)  |  Derive(0)  |  Import(2)

src/m/a/mayan-HEAD/apps/acls/managers.py   mayan(Download)
from permissions.models import Permission, RoleMember
 
from .classes import AccessHolder, ClassAccessHolder, get_source_object
 
logger = logging.getLogger(__name__)
    def grant(self, permission, actor, obj):
        """
        Grant a permission (what), (to) an actor, (on) a specific object
        """
        obj = get_source_object(obj)
        actor = get_source_object(actor)
    def revoke(self, permission, actor, obj):
        """
        Revoke a permission (what), (from) an actor, (on) a specific object
        """
        obj = get_source_object(obj)
        actor = get_source_object(actor)

src/m/a/mayan-HEAD/apps/acls/utils.py   mayan(Download)
 
from .models import AccessEntry, DefaultAccessEntry, CreatorSingleton
from .classes import get_source_object
 
logger = logging.getLogger(__name__)
 
 
def apply_default_acls(obj, actor=None):
    logger.debug('actor, init: %s' % actor)
    obj = get_source_object(obj)