def register_access_role(cls):
 try:
  role_name = cls.ROLE
  REGISTERED_ACCESS_ROLES[role_name] = cls
 except AttributeError:
  log.exception(u"Unable to register Access Role with attribute 'ROLE'.")
 return cls

def register_access_role ( cls ) : try : role_name = cls . ROLE REGISTERED_ACCESS_ROLES [ role_name ] = cls except AttributeError : log . exception ( u"Unable to register Access Role with attribute 'ROLE'." ) return cls
decorator that allows access roles to be registered within the roles module and referenced by their string values .