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

Org model: Domain request table - users can still see the "edit" and "manage" buttons despite not having permissions #3291

Closed
zandercymatics opened this issue Jan 3, 2025 · 0 comments · Fixed by #3306
Assignees
Labels
bug Something that isn't working as intended dev issue is for the dev team

Comments

@zandercymatics
Copy link
Contributor

zandercymatics commented Jan 3, 2025

Current Behavior

When a portfolio user does not have the "Create and edit requests" (EDIT_REQUESTS) permission, they can still see the "edit" and "manage" buttons for readonly domain request entries on the domain request table.

Expected Behavior

When a user does not have the "Create and edit requests" (EDIT_REQUESTS) permission, we should display the view button as we do for other view-only rows. This should apply for all statuses.

Note that this should ONLY occur when in org view. If the waffle flag is off and/or the user is not part of a portfolio, they should still see and be able to access the edit and manage buttons as normal.

Steps to Reproduce

Assuming that you are starting with either a fresh portfolio or a portfolio created by fixtures:

  1. Enable the organization_feature and organization_requests waffle flags
  2. Add yourself to a portfolio as an admin WITH the "create and edit requests" permission
  3. Start a new domain request, and leave it in started. Create another and submit it.
  4. Change your permissions and REMOVE the "create and edit requests" permission
  5. Going back to the portfolio, note that you can still see the edit / manage buttons for said request despite not being permissioned to do so

Environment

Stable, staging, development + most sandboxes

Additional Context

From a glance, the code for this is mostly contained in domain_requests_json.py within the serialize_domain_request function. That would be a good place to start.
See this thread for more context and images of the behavior

Issue Links

No response

@zandercymatics zandercymatics added the bug Something that isn't working as intended label Jan 3, 2025
@zandercymatics zandercymatics added dev issue is for the dev team quick fix labels Jan 3, 2025
@abroddrick abroddrick changed the title Org view: Domain request table - users can still see the "edit" and "manage" buttons despite not having access Org model: Domain request table - users can still see the "edit" and "manage" buttons despite not having permissions Jan 3, 2025
@abroddrick abroddrick moved this from 👶 New to 🍦 Backlog in .gov Product Board Jan 3, 2025
@abroddrick abroddrick moved this from 🍦 Backlog to 🎯 Ready in .gov Product Board Jan 3, 2025
@dave-kennedy-ecs dave-kennedy-ecs moved this from 🎯 Ready to 👀 In review in .gov Product Board Jan 6, 2025
rachidatecs added a commit that referenced this issue Jan 8, 2025
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in .gov Product Board Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working as intended dev issue is for the dev team
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants