-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backup Log #2
Comments
# TODO: base_role => parent_role
# TODO: support multi-level tree
def org_roles *children, by_parent:, **options
has_role by_parent, options.merge!(children: children)
has_roles children, options.merge!(parent: by_parent)
end |
module PermissionQuerying
def can? pred, obj0 = nil, obj: nil, without_group: false
obj = obj0 || obj
return true if temporarily_can?(pred, obj)
# permission = ii_config.permission_model.which(pred: pred, obj: obj)
# return true if is_one_of? *permission.related_roles.map(&:name)
# stored_roles.each { |role| return true if role.can? pred, obj }
return true if ii_config.permission_model.matched?(pred: pred, obj: obj, in: permissions_of_stored_roles)
return false if without_group || ii_config.without_group
# is_in_one_of? *permission.related_role_groups.map(&:name)
ii_config.permission_model.matched?(pred: pred, obj: obj, in: permissions_of_role_groups)
end
end |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Role Definition Done, but name ["string1"] have been used by other role or group
(redefine) [next]The text was updated successfully, but these errors were encountered: