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

New User Default Role Toggle is Broken in Rancher UI #4992

Closed
nayrnet opened this issue Jan 26, 2022 · 14 comments
Closed

New User Default Role Toggle is Broken in Rancher UI #4992

nayrnet opened this issue Jan 26, 2022 · 14 comments
Assignees
Labels
Milestone

Comments

@nayrnet
Copy link
Member

nayrnet commented Jan 26, 2022

Rancher Server Setup

  • Rancher version: 2.6.3
  • Installation option (Docker install/Helm Chart): Docker/Helm/Hosted Rancher

Information about the Cluster

  • Kubernetes version: 1.20 & 1.21
  • Cluster Type (Local/Downstream): Local/Global

User Information

  • What is the role of the user logged in? Admin & Restricted Admin

Describe the bug
In new Rancher UI, changing the "New User Default" Global Role value is broken, cannot select "No" for Standard User, or select "Yes" on another Role.

To Reproduce
On any 2.6.x instance, go to Users & Authentication -> Roles -> Standard User -> Edit Config -> Try to change "New User Default" to no.

Result
The User Interface does not let you change this Value, if you change to the old user interface you can.

Expected Result
Should be able to configure or unconfigure new user default.

Screenshots
Screen Shot 2022-01-26 at 10 13 11 AM

Additional context
Tested in Safari and Chrome

SURE-3966

@gaktive gaktive transferred this issue from rancher/rancher Jan 26, 2022
@gaktive gaktive added this to the v2.6.5 milestone Jan 26, 2022
@nayrnet
Copy link
Member Author

nayrnet commented Jan 27, 2022

A workaround is to open the hidden legacy UI via: https://RANCHERSERVERURL/g (replace /dashboard/ with /g/) then you can change these settings as needed.

@nwmac
Copy link
Member

nwmac commented Jan 31, 2022

This appears to work on 2.6.2 - need to check on 2.6.3

@cnotv cnotv self-assigned this Mar 10, 2022
@cnotv
Copy link
Contributor

cnotv commented Mar 10, 2022

This appears to work on 2.6.2 - need to check on 2.6.3

Not now, it returns

Cannot use 'in' operator to search for 'newUserDefault' in null

@cnotv
Copy link
Contributor

cnotv commented Mar 10, 2022

Analogue error happens while typing the description.

@cnotv
Copy link
Contributor

cnotv commented Mar 10, 2022

@nwmac I think we should fix this issue before release 2.6.4 as every global role cannot be created or edited:

  • Path: /c/local/auth/roles
  • Users & Authentication > Roles > Create/Edit

@catherineluse
Copy link
Contributor

@cnotv I got this error when trying to type a description for a new global role:
Screen Shot 2022-03-10 at 10 49 32 AM

@cnotv
Copy link
Contributor

cnotv commented Mar 10, 2022

The description issue seems to come out from this https://github.com/rancher/dashboard/blob/master/components/form/NameNsDescription.vue#L251-L258

@nwmac
Copy link
Member

nwmac commented Mar 10, 2022

@cnotv if we know how to fix it then we can get it in to 2.6.4

@cnotv
Copy link
Contributor

cnotv commented Mar 11, 2022

In any case for the description the issue seems to be the UI trying to set the value for description which has not a setter for the model 🤷

For the radio button it just cannot find the context at all (this returns null), even more enigmatic 😅

@cnotv
Copy link
Contributor

cnotv commented Mar 11, 2022

@nwmac beside analyzing the YAML, how can I test the behavior of actually setting a global user role as New User Default Role?

@cnotv
Copy link
Contributor

cnotv commented Mar 11, 2022

For the records, this is also required for other role editor pages:

  • models/management.cattle.io.globalrole.js
  • models/management.cattle.io.globalrolebinding.js
  • models/management.cattle.io.roletemplate.js

@cnotv
Copy link
Contributor

cnotv commented Mar 11, 2022

@nwmac beside analyzing the YAML, how can I test the behavior of actually setting a global user role as New User Default Role?

Ok basically this can be verified also on user role creation.

@cnotv cnotv modified the milestones: v2.6.5, v2.6.4 Mar 15, 2022
@Josh-Diamond
Copy link

Ticket #4992 - Test Results

With docker on single-node install:

Reproduced on v2.6.3:

  1. Fresh install of rancher v2.6.3
  2. As admin, go to Users & Authentication
  3. Select Roles
  4. Find Standard User and then edit config
  5. Reproduced - New User Default is unable to be modified

Screenshot:
New User Default is selected as Yes and cannot be modifed
Screen Shot 2022-03-16 at 10 15 40 AM

Verified on v2.6-3b2677f931ef0ae4d2e773a2c5673ce968c8e9cd-head:

  1. Fresh install of rancher v2.6-head
  2. As admin, go to Users & Authentication
  3. Select Roles
  4. Find Standard User and then edit config
  5. Verified - New User Default is able to be modified

Screenshot:
New User Default is selected as Yes and can be modified to No
Screen Shot 2022-03-16 at 10 27 17 AM

Upgrade Verified on v2.6.3 >> v2.6-3b2677f931ef0ae4d2e773a2c5673ce968c8e9cd-head:

  1. Fresh install of rancher v2.6.3
  2. As admin, go to Users & Authentication
  3. Select Roles
  4. Find Standard User and then edit config
  5. Reproduced - New User Default is unable to be modified
  6. Upgrade rancher from v2.6.3 >> v2.6-head
  7. As admin, go to Users & Authentication
  8. Select Roles
  9. Find ‘Standard Userand thenedit config`
  10. Upgrade Verified - New User Default is able to be modified

@zube zube bot reopened this Mar 16, 2022
@gaktive
Copy link
Member

gaktive commented Mar 16, 2022

Zube reopened this open reading the ticket, strange. Reclosing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants