(self)
return return_dict
Get a dict of all users/groups that have permission on the object.

        Returns:
            Dict with users/groups as the key and permissions as the value.
                Usernames are prepended by user/ and groups by groups/.
Get a dict of all users/groups that have permission on the object.
Get a dict of all users / groups that have permission on the object .
def get_all_permissions(self):
        """Get a dict of all users/groups that have permission on the object.

        Returns:
            Dict with users/groups as the key and permissions as the value.
                Usernames are prepended by user/ and groups by groups/.
        """
        return_dict = {}

        # pylint: disable=singleton-comparison
        aces = self.AccessControlEntry.query.filter(
            not_(self.AccessControlEntry.user == None),
            self.AccessControlEntry.parent == self).all()

        for ace in aces:
            name = 'user/{0:s}'.format(ace.user.username)
            return_dict.setdefault(name, [])
            return_dict[name].append(ace.permission)

        group_aces = self.AccessControlEntry.query.filter(
            not_(self.AccessControlEntry.group == None),
            self.AccessControlEntry.parent == self).all()

        for ace in group_aces:
            name = 'group/{0:s}'.format(ace.group.name)
            return_dict.setdefault(name, [])
            return_dict[name].append(ace.permission)

        return_dict['is_public'] = bool(self.is_public)

        return return_dict
def get_all_permissions ( self ) : return_dict = { } # pylint: disable=singleton-comparison aces = self . AccessControlEntry . query . filter ( not_ ( self . AccessControlEntry . user == None ) , self . AccessControlEntry . parent == self ) . all ( ) for ace in aces : name = 'user/{0:s}' . format ( ace . user . username ) return_dict . setdefault ( name , [ ] ) return_dict [ name ] . append ( ace . permission ) group_aces = self . AccessControlEntry . query . filter ( not_ ( self . AccessControlEntry . group == None ) , self . AccessControlEntry . parent == self ) . all ( ) for ace in group_aces : name = 'group/{0:s}' . format ( ace . group . name ) return_dict . setdefault ( name , [ ] ) return_dict [ name ] . append ( ace . permission ) return_dict [ 'is_public' ] = bool ( self . is_public ) return return_dict