Allura/allura/lib/security.py
def load_project_roles(self, *project_ids):
        '''Load the credentials with all user roles for a set of projects'''
        # Don't reload roles
        project_ids = [
            pid for pid in project_ids if self.projects.get(pid) is None]
        if not project_ids:
            return
        q = self.project_role.find({
            'project_id': {'$in': project_ids}})
        roles_by_project = dict((pid, []) for pid in project_ids)
        for role in q:
            roles_by_project[role['project_id']].append(role)
        for pid, roles in roles_by_project.iteritems():
            self.projects[pid] = RoleCache(self, roles)
Load the credentials with all user roles for a set of projects
Load the credentials with all user roles for a set of projects
Load the credentials with all user roles for a set of projects
def load_project_roles(self, *project_ids):
        project_ids = [
            pid for pid in project_ids if self.projects.get(pid) is None]
        if not project_ids:
            return
        q = self.project_role.find({
            'project_id': {'$in': project_ids}})
        roles_by_project = dict((pid, []) for pid in project_ids)
        for role in q:
            roles_by_project[role['project_id']].append(role)
        for pid, roles in roles_by_project.iteritems():
            self.projects[pid] = RoleCache(self, roles)
def load_project_roles ( self , * project_ids ) : project_ids = [ pid for pid in project_ids if self . projects . get ( pid ) is None ] if not project_ids : return q = self . project_role . find ( { 'project_id' : { '$in' : project_ids } } ) roles_by_project = dict ( ( pid , [ ] ) for pid in project_ids ) for role in q : roles_by_project [ role [ 'project_id' ] ] . append ( role ) for pid , roles in roles_by_project . iteritems ( ) : self . projects [ pid ] = RoleCache ( self , roles )
Load the credentials with all user roles for a set of projects
Load the credentials with all user roles for a set of projects
'''Load the credentials with all user roles for a set of projects''' # Don't reload roles
self