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

allow checklist dependency to filter options #5650

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

pxpm
Copy link
Contributor

@pxpm pxpm commented Sep 4, 2024

WHY

fixes Laravel-Backpack/PermissionManager#362

BEFORE - What was wrong? What was happening before this PR?

It was not possible to filter out some roles/permissions from the interface.

AFTER - What is happening after this PR?

It's now possible to filter out permissions/roles that shouldn't display in the interface.

HOW

How did you achieve that, in technical terms?

Introduced options key (similar to what we have in other fields) to allow the customization of the query.

Is it a breaking change?

No

How can we test the before & after?

In a checklist_dependency field define options => fn($query) => $query->where('name', '!=', 'admin') for eg, and see that the role admin is excluded from the list of roles.

@pxpm pxpm merged commit 23a0630 into main Sep 4, 2024
9 checks passed
@pxpm pxpm deleted the checklist-dependency-option-filter branch September 4, 2024 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

htmlspecialchars(): Argument #1 ($string) must be of type string, Closure given
1 participant