The domain model
Deadbolt has three domain models, all located in the be.objectify.deadbolt.java.models
package - Subject
, Role
and Permission
. Each is an interface, allowing you to implement it in your preferred style.
Subject
represents, typically, a user- A
Role
is a single system privilege, e.g. admin, user and so on. A subject can have zero or more roles. - A
Permission
is a can be used with regular expression matching, e.g. a subject with a permission of printers.admin can access a resource constrained to printers., .admin, etc. A subject can have zero or more permissions.
As of version 2.5.1, it's possible to associate permissions with roles using the getPermissionsForRole
method of DeadboltHandler
. This will be discussed in detail in the Integrating Deadbolt section.
Updated over 4 years ago