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

Enhancement proposal/user auth uncheck default stduser #17

Merged

Conversation

mmartin24
Copy link
Collaborator

@mmartin24 mmartin24 commented May 13, 2024

Issue


When creating a user in Users & Authentication, the option Standard User is preselected, so if another option with lower permissions, like "User-Base" is marked without deselecting the Standard User one first, we will not be granted the desired restricted permissions, but more:
image

Done

  • Extend function createUser with a flag to deselect the pre-selected Standard User option.
  • Add unit test to confirm deselection works and the User-base role has correct permissions.
  • Add unit test to confirm deselection is disabled if not set to true and default creation of Standard role has correct permissions.

Additional info

I tried to confirm the selection/deselection of the check using locators, but I did not find a change on the UI on its state, so to check if the flag had been correctly removed, I added a logout and a new login with the specific user to later check if some restricted options like Continuous Delivery were accessible to the user.

@mmartin24 mmartin24 added the enhancement New feature or request label May 13, 2024
@mmartin24 mmartin24 self-assigned this May 13, 2024
@mmartin24 mmartin24 marked this pull request as ready for review May 14, 2024 08:27
@mmartin24 mmartin24 requested a review from juadk May 14, 2024 08:28
Adding unit test for "User-Base" role unchecking "Standard User" first

Signed-off-by: Manuel Martín <[email protected]>
Changing assertion option

Signed-off-by: Manuel Martín <[email protected]>
Adding login as admin to delete user

Signed-off-by: Manuel Martín <[email protected]>
Signed-off-by: Manuel Martín <[email protected]>
@mmartin24 mmartin24 force-pushed the enhancement-proposal/user-auth-uncheck-default-stduser branch from a080f6d to ae1e148 Compare May 14, 2024 08:35
Copy link
Collaborator

@juadk juadk left a comment

Choose a reason for hiding this comment

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

LGTM

@mmartin24 mmartin24 merged commit fa01d08 into main May 14, 2024
3 checks passed
@mmartin24 mmartin24 deleted the enhancement-proposal/user-auth-uncheck-default-stduser branch May 14, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants