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

Filter default sites for items user setting #2167

Merged
merged 7 commits into from
Mar 29, 2024

Conversation

jimsafley
Copy link
Member

@jimsafley jimsafley commented Mar 14, 2024

This is an attempt to resolve a conflict between the "assign_new_items" site setting and the "can-assign-items" user permission. Put simply, a site can be set to automatically assign itself to new items, but the user can lack the permission to assign items to the site. This conflict could lead to a broken "Site" tab on the item add page (see #2166).

This PR fixes the conflict by a) limiting the sites on the site selector sidebar to those that the current user has "can-assign-items" permission; and b) adding the sites that are "assign_new_items" but restricted by "can-assign-items" to the "Site" tab, giving users the opportunity to assign these restricted sites, but only on the item add page. A few other changes to the site selector element, the item adapter, and JS were necessary to accomplish this.

@jimsafley jimsafley requested a review from zerocrates March 14, 2024 18:27
@zerocrates zerocrates merged commit 413a611 into develop Mar 29, 2024
5 checks passed
@zerocrates zerocrates deleted the fix-default-site-for-items branch March 29, 2024 21:03
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.

2 participants