package
0.1.1-beta.2
Repository: https://github.com/digimakergo/digimaker.git
Documentation: pkg.go.dev
# Functions
if it returns true, also it return the matched limit, false doesn't return limit.
AssignToUser assigns a role to a user.
support keys: contenttype, id(parent locaton id), under, parent author(include "self").
support keys: contenttype, id(locaton id), under, author(include "self").
If the use can read the contentsupport keys: contenttype, id(locaton id), under, author(include "self").
support keys: contenttype, id(locaton id), under, author(include "self").
GetLimitsFromPolicy gets all limits from a policies.
add condition from permission.
No description provided by the author
No description provided by the author
GetRolePolicies returns policies of role ids.
No description provided by the author
No description provided by the author
Get user's limits.empty result means no access - not no limit, while a empty limit(empty map) in the slice means no limit(can do anything) return access list, access type, error if accessType is AccessWithLimit, there must be valid values in the access list.
GetUserPolicies returns policies of a user, if it's already cached in the context, return it.todo: Will be a powerful to support variables in policies.
If the user has acccess given data(targetData here)If realData is empty, just check if the user has given operation(can be full access or partly access to that operation).
InitPolicyContext cache the policies into provided context.
No description provided by the author
RemoveAssignment removes a user from role assignment.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
Policy collection.