Skip to content

Show all app resources to users lacking preferences permission#7990

Merged
grantfitzsimmons merged 3 commits intov7_12_0_4from
issue-7984
Apr 18, 2026
Merged

Show all app resources to users lacking preferences permission#7990
grantfitzsimmons merged 3 commits intov7_12_0_4from
issue-7984

Conversation

@melton-jason
Copy link
Copy Markdown
Contributor

Fixes part of #7984

The other is an error in the filter behavior to determine which App Resources to show that was introduced by f27aa03 in #7557:

specify7/specifyweb/frontend/js_src/lib/components/AppResources/filtersHelpers.ts

Lines 55 to 63 in 816121c

const hasEditPermission = hasPermission(
'/preferences/collection',
'edit_collection'
);

const finalAppResources = baseAppResources.filter((resource) => {
if (resource.name !== 'CollectionPreferences') {
return hasEditPermission;
}
If the user does not have permissions to edit the new Collection Preferences, then all AppResources will be hidden except for Collection Preferences. The intention here was to clearly flip that behavior and only hide the Collection Preferences when the user does not have the permission

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone
  • Add pr to documentation list
  • Add automated tests

Testing instructions

💡 In the application, the /preferences/collection > edit_collection permission is displayed as Preferences > Collection > Edit Collection
Screenshot 2026-04-17 at 12 52 51 PM

  • Login to a specify instance as a user which has the /preferences/collection > edit_collection permission
  • Ensure that all App Resources in all scopes are present on this branch compared to the instance on v7.11.4
  • Login to a specify instance as a user which does not have the /preferences/collection > edit_collection permission
  • Ensure that only the Collection Preferences App Resources scoped to Collection are not visible when compared to the instance on v7.11.4

Copy link
Copy Markdown
Member

@grantfitzsimmons grantfitzsimmons left a comment

Choose a reason for hiding this comment

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

  • Login to a specify instance as a user which has the /preferences/collection > edit_collection permission
  • Ensure that all App Resources in all scopes are present on this branch compared to the instance on v7.11.4
  • Login to a specify instance as a user which does not have the /preferences/collection > edit_collection permission
  • Ensure that only the Collection Preferences App Resources scoped to Collection are not visible when compared to the instance on v7.11.4
Image

Copy link
Copy Markdown
Collaborator

@bhumikaguptaa bhumikaguptaa left a comment

Choose a reason for hiding this comment

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

  • Ensure that all App Resources in all scopes are present on this branch compared to the instance on v7.11.4
  • Ensure that only the Collection Preferences App Resources scoped to Collection are not visible when compared to the instance on v7.11.4
    --
    Works as expected!
Image Image

@grantfitzsimmons grantfitzsimmons merged commit 87d9411 into v7_12_0_4 Apr 18, 2026
14 checks passed
@grantfitzsimmons grantfitzsimmons deleted the issue-7984 branch April 18, 2026 01:03
@github-project-automation github-project-automation bot moved this from 📋Back Log to ✅Done in General Tester Board Apr 18, 2026
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.

4 participants