django_roles_access.models.
TemplateAccess
(*args, **kwargs)[source]¶Implements content security.
This model let administrator to add or remove Groups (roles) from roles attribute. In templates, users belonging to any added group will pass the check.
DoesNotExist
¶MultipleObjectsReturned
¶flag
¶Template’s flag, text label, to identify each template access object. Flag must be unique.
roles
¶One or more roles (django.contrib.auth.models.Group()
) with access.
django_roles_access.models.
ViewAccess
(*args, **kwargs)[source]¶Implements security in views having a name.
The view name is view attribute value. The security for view name is configured with next two attributes: type (type of security) and roles (only if type is By role).
DoesNotExist
¶MultipleObjectsReturned
¶roles
¶One or more roles (django.contrib.auth.models.Group()
) with access.
This attributes can always be empty. If the type selected is By role
and no roles are added to this attribute, then checkviewaccess will
report an ERROR.
type
¶The type of access as defined by ACCESS_TYPES
view
¶View’s name to be secured. Value can be just a view name ‘objects_a’, with application name: ‘app_name:index’, or a nested configurations with namespaces: ‘namespace_1:namespace_2:index’.
May 22, 2019