Package s3 :: Module s3aaa :: Class S3OrgRoleManager
[frames] | no frames]

Class S3OrgRoleManager

source code

     object --+        
              |        
s3rest.S3Method --+    
                  |    
S3EntityRoleManager --+
                      |
                     S3OrgRoleManager

Instance Methods
 
__init__(self, *args, **kwargs)
Constructor
source code
 
get_context_data(self, r, **attr)
Override to set the context from the perspective of an entity
source code
 
get_entity(self)
We are on an entity (org/office) so we can fetch the entity details from the request record.
source code
 
get_user(self)
The edit parameter
source code
 
get_foreign_object(self)
We are on an entity so our target is a user account.
source code
 
get_assigned_roles(self, entity_id=None, user_id=None)
Override to get assigned roles for this entity
source code
 
get_form_fields(self)
Override the standard method so we can add the user-selection field to the list.
source code

Inherited from S3EntityRoleManager: apply_method, get_access_levels, get_form, get_form_vars, get_modules, get_realm, update_roles

Inherited from s3rest.S3Method: __call__, widget

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods

Inherited from S3EntityRoleManager: set_method

Static Methods

Inherited from s3rest.S3Method: crud_string

Class Variables

Inherited from S3EntityRoleManager: ENTITY_TYPES

Properties

Inherited from object: __class__

Method Details

__init__(self, *args, **kwargs)
(Constructor)

source code 

Constructor

Overrides: object.__init__

get_context_data(self, r, **attr)

source code 

Override to set the context from the perspective of an entity

Returns:
dictionary for view
Overrides: S3EntityRoleManager.get_context_data

get_entity(self)

source code 

We are on an entity (org/office) so we can fetch the entity details from the request record.

Returns:
dictionary containing the ID and name of the entity

get_user(self)

source code 

The edit parameter

Returns:
dictionary containing the ID and username/email of the user account.

get_foreign_object(self)

source code 

We are on an entity so our target is a user account.

Returns:
dictionary with ID and username/email of user account

get_assigned_roles(self, entity_id=None, user_id=None)

source code 

Override to get assigned roles for this entity

Returns:
dictionary with user IDs as the keys.
Overrides: S3EntityRoleManager.get_assigned_roles

get_form_fields(self)

source code 

Override the standard method so we can add the user-selection field to the list.

Returns:
list of Fields
Overrides: S3EntityRoleManager.get_form_fields