-
Notifications
You must be signed in to change notification settings - Fork 31
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
implements CachedRbac functionality. #90
Conversation
@@ -180,6 +181,11 @@ protected function _matchPermission(array $permission, $user, $role, ServerReque | |||
$return = (bool)call_user_func($value, $user, $role, $request); | |||
} elseif ($value instanceof Rule) { | |||
$return = (bool)$value->allowed($user, $role, $request); | |||
} elseif (is_array($value) && array_key_exists('className', $value)) { | |||
$rule = RuleRegistry::get($value['className'], $value['options'] ?? []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we get an error if not used a valid class here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. This is the last comment to fix before merge. Thank you @skie
I've merged it and left the comment for a future improvement, thank you @skie |
No description provided.