Skip to content

implements CachedRbac functionality. - #90

Merged
steinkel merged 1 commit into
9.next-cake4from
feature/cached-rbac
Oct 22, 2024
Merged

implements CachedRbac functionality.#90
steinkel merged 1 commit into
9.next-cake4from
feature/cached-rbac

Conversation

@skie

@skie skie commented Sep 5, 2024

Copy link
Copy Markdown
Member

No description provided.

Comment thread src/Rbac/CachedRbac.php
Comment thread src/Rbac/CachedRbac.php
Comment thread src/Rbac/Rbac.php
} 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Comment thread src/Rbac/CachedRbac.php
@steinkel
steinkel merged commit 00d896e into 9.next-cake4 Oct 22, 2024
@steinkel
steinkel deleted the feature/cached-rbac branch October 22, 2024 17:44
@steinkel

Copy link
Copy Markdown
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