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

The tab Permissions should be hidden when "Has full system access?" is set to Yes #13564

Open
wants to merge 4 commits into
base: 5.x
Choose a base branch
from

Conversation

nox1134
Copy link
Member

@nox1134 nox1134 commented Mar 20, 2024

Fixes #13441 by @andersonjeccel

Q A
Bug fix? (use the a.b branch) [x]
New feature/enhancement? (use the a.x branch) [ ]
Deprecations? [ ]
BC breaks? (use the c.x branch) [ ]
Automated tests included? [ ]
Related user documentation PR URL mautic/mautic-documentation#...
Related developer documentation PR URL mautic/developer-documentation#...
Issue(s) addressed Fixes #...

Description:

Hide the "Permissions" tab in the role creation interface when "Has full system access?" is set to "Yes". This prevents confusion and ensures a smoother user experience by removing access to an irrelevant tab.

Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)
  2. Open mautic and open the right sidebar
  3. Click on Roles
  4. Create a new role (+ New)
  5. Set "Has full system access?" to "Yes" and click save.
  6. Verify that the "Permissions" tab is hidden.
  7. Set "Has full system access?" to "No" and click save and verify that the "Permissions" tab becomes visible again.

Screenshots:

image image

Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
Copy link

codecov bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.50%. Comparing base (4f420ab) to head (5a97fa5).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                5.x   #13564      +/-   ##
============================================
- Coverage     61.50%   61.50%   -0.01%     
  Complexity    34068    34068              
============================================
  Files          2241     2241              
  Lines        101852   101853       +1     
============================================
  Hits          62647    62647              
- Misses        39205    39206       +1     
Files Coverage Δ
app/bundles/UserBundle/Form/Type/RoleType.php 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Copy link
Contributor

@andersonjeccel andersonjeccel left a comment

Choose a reason for hiding this comment

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

Seems great!
Thanks for this fix

@andersonjeccel andersonjeccel added bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test user-experience Anything related to related to workflows, feedback, and navigation roles Anything related to users and roles labels Mar 21, 2024
@andersonjeccel
Copy link
Contributor

@Esthertests Would you like to test it?

@andersonjeccel
Copy link
Contributor

@nox1134
Oh, the CS test failed (fast to fix, it's only a spacing problem)

Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
@andersonjeccel
Copy link
Contributor

@rohit-sharma-1802 We would appreciate a test here 🙏

Copy link
Sponsor Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

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

It should be hidden in JS, not PHP. What if I want to change a role from full system access to a specific role? The tab will never appear:
Screenshot 2024-03-26 at 09 15 39

@andersonjeccel
Copy link
Contributor

Hey @nox1134!
Would you have time to implement the suggested changes by John?

Thanks in advance!

@LordRembo
Copy link
Contributor

@andersonjeccel Maybe this is also a thing that @mallezie could look at next week?

@andersonjeccel
Copy link
Contributor

If Priyanshi didn't start yet and prefer to let Tim do it, that's fine

@nox1134
Copy link
Member Author

nox1134 commented Apr 9, 2024

Hi @andersonjeccel ! I've started working on this issue, but if I encounter any issues, Tim can collaborate on it.
Thank you!

@andersonjeccel
Copy link
Contributor

@nox1134 thanks!

@andersonjeccel andersonjeccel added the pending-feedback PR's and issues that are awaiting feedback from the author label Apr 17, 2024
@nox1134
Copy link
Member Author

nox1134 commented May 4, 2024

@escopecz, the changes will only appear when you click save. So, when I set 'has full system access?' to 'no' and then click save, the permission tab appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs pending-feedback PR's and issues that are awaiting feedback from the author ready-to-test PR's that are ready to test roles Anything related to users and roles user-experience Anything related to related to workflows, feedback, and navigation
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

[UX] The tab Permissions should be hidden when "Has full system access?" is set to Yes
4 participants