congress.context module¶
RequestContext: context for requests that persist through congress.
-
class
congress.context.
RequestContext
(user_id, tenant_id, is_admin=None, read_deleted='no', roles=None, timestamp=None, load_admin_roles=True, request_id=None, tenant_name=None, user_name=None, overwrite=True, **kwargs)¶ Bases:
oslo_context.context.RequestContext
Security context and request information.
Represents the user taking a given action within the system.
-
FROM_DICT_EXTRA_KEYS
= ['user_id', 'tenant_id', 'project_id', 'read_deleted', 'timestamp', 'tenant_name', 'project_name', 'user_name']¶
-
elevated
(read_deleted=None)¶ Return a version of this context with admin flag set.
-
property
project_id
¶
-
property
read_deleted
¶
-
property
tenant_id
¶
-
to_dict
()¶ Return a dictionary of context attributes.
-
property
user_id
¶
-
-
congress.context.
get_admin_context
(read_deleted='no', load_admin_roles=True)¶