-
Notifications
You must be signed in to change notification settings - Fork 382
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
CLDR-14788 Hide TC and manager level menu items from vetters #3871
Conversation
-Front end: hide buttons for Show all users, unless new function canListMultipleUsers returns true, that is, userIsManager -Front end: in main menu hide My Organization section header if the section would be empty -Front end: canListUsers and canMonitorVetting only if userIsManager -Front end: canSeeUnofficialEmail only if isUnofficial and userIsManager -Back end: canDoList only if isManagerOrStronger -Back end: SurveyVettingParticipation only if isManagerOrStronger
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs test fix but it's basically ok.
The "My Account" panel under https://cldr-smoke.unicode.org/cldr-apps/v#account/// may be hidden as a result of this. (try it when logged in on smoketest)
A good followon might be to have a simple popover when you mouse over the user's name in the header that shows the user's name, organization, status, email address etc. Currently the user's name has a tooltip showing their email address.
@@ -354,6 +356,10 @@ function getTableEnd(json) { | |||
return html; | |||
} | |||
|
|||
function canListMultipleUsers() { | |||
return !!cldrStatus.getPermissions()?.userIsManager; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another way would be to expand the cldrStatus.getPermissions()
struct ( a string -> boolean map i think) to include a new item from the server side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I'll follow up with a PR to get canDoList from the back end...
@@ -381,7 +381,7 @@ public boolean canImportOldVotes(CheckCLDR.Phase inPhase) { | |||
} | |||
|
|||
public boolean canDoList() { | |||
return isVetter(); | |||
return isManagerOrStronger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unit tests are failing here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. Fixed by the 2nd commit
-Make userCanDoList false for vetter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good that we have a test
Testing locally, "My Account" is still visible for a vetter, it just lacks the "Show all users" button. I'll double check on smoketest |
I did, and it's OK: "My Account" is still visible for a vetter |
-Front end: hide buttons for Show all users, unless new function canListMultipleUsers returns true, that is, userIsManager
-Front end: in main menu hide My Organization section header if the section would be empty
-Front end: canListUsers and canMonitorVetting only if userIsManager
-Front end: canSeeUnofficialEmail only if isUnofficial and userIsManager
-Back end: canDoList only if isManagerOrStronger
-Back end: SurveyVettingParticipation only if isManagerOrStronger
-Back end: fix TestUserLevel.csv, userCanDoList false for vetter
CLDR-14788
ALLOW_MANY_COMMITS=true