Skip to content
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

Merged
merged 1 commit into from
Oct 22, 2024
Merged

Conversation

skie
Copy link
Member

@skie skie commented Sep 5, 2024

No description provided.

@@ -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'] ?? []);
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do it.

Copy link
Member

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

@steinkel steinkel merged commit 00d896e into 9.next-cake4 Oct 22, 2024
20 checks passed
@steinkel steinkel deleted the feature/cached-rbac branch October 22, 2024 17:44
@steinkel
Copy link
Member

I've merged it and left the comment for a future improvement, thank you @skie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants