예제 #1
0
파일: protection.py 프로젝트: jacg/indico
 def _process_args(self):
     RHManageEventBase._process_args(self)
     args = parser.parse({
         'values': PrincipalDict(allow_groups=True, allow_external_users=True, allow_event_roles=True,
                                 allow_category_roles=True, event_id=self.event.id, missing={})
     })
     self.values = args['values']
예제 #2
0
class RHEventPrincipals(PrincipalsMixin, RHAuthenticatedEventBase):
    @use_rh_kwargs({
        'values': PrincipalDict(allow_groups=True, allow_external_users=True, allow_event_roles=True,
                                allow_category_roles=True, allow_registration_forms=True, allow_emails=True,
                                missing={})
    }, rh_context=('event',))
    def _process(self, values):
        self.values = values
        return PrincipalsMixin._process(self)
예제 #3
0
class RHEventPrincipals(PrincipalsMixin, RHManageEventBase):
    ALLOW_LOCKED = True
    PERMISSION = 'ANY'

    @use_rh_kwargs({
        'values': PrincipalDict(allow_groups=True, allow_external_users=True, allow_event_roles=True,
                                allow_category_roles=True, allow_registration_forms=True, allow_emails=True,
                                missing={})
    }, rh_context=('event',))
    def _process(self, values):
        self.values = values
        return PrincipalsMixin._process(self)
예제 #4
0
class RHPrincipals(PrincipalsMixin, RHProtected):
    """Resolve principal identifiers to their actual objects.

    This is intended for PrincipalListField which needs to be able
    to resolve the identifiers provided to it to something more
    human-friendly.
    """
    @use_kwargs({
        'values':
        PrincipalDict(allow_groups=True, allow_external_users=True, missing={})
    })
    def _process_args(self, values):
        self.values = values