Internal django-tutelary models

class tutelary.models.RoleManager

Custom manager for roles: ensures that role variable assignments cover all the variables used in the role’s policies.

class tutelary.models.PolicyInstance(*args, **kwargs)

An instance of a policy provides fixed values for any variables used in the policy’s body. An ordered sequence of policy instances defines a permission set.

class tutelary.models.PermissionSet(*args, **kwargs)

A permission set represents the complete set of permissions resulting from the composition of a sequence of policy instances. The sequence of policy instances is recorded using the PolicyInstance model and the permission tree is constructed lazily from this information when the permission set is read from the database.

class tutelary.models.PermissionSetManager

Permission sets have a custom manager that folds all instances with the same set of policy instances together in the database.