-
Notifications
You must be signed in to change notification settings - Fork 173
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
[User Accounts] Permissions panel fix #7451
[User Accounts] Permissions panel fix #7451
Conversation
@AlexandraLivadas Tests are failing.
|
@laemtl The tests seem to be passing fine on my sandbox so I will re-run Travis. If it still is failing, I will debug :) |
Tests failing, @AlexandraLivadas |
@AlexandraLivadas any news on this? do you need help with the tests ? |
9f2d9a7
to
726455e
Compare
@laemtl @kongtiaowang This is ready for review |
FROM permissions p "; | ||
|
||
//If not superuser, get the permissions that the user has | ||
if (intval($this->permissions['superuser']) != 1) { |
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.
Why not using hasPermission('superuser')?
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.
I will checkout this branch and make sure there was a reason for this decision :)
FROM permissions p "; | ||
|
||
//If not superuser, get the permissions that the user has | ||
if ($this->hasPermission('superuser')) { |
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.
I think this line should be:
if (!$this->hasPermission('superuser')) {
Then your new test case should start working again. You can try to add it back. Thanks!
The permissions panel on the edit user page is not correctly displaying Permission descriptions for user's with superuser permission. This is because of a superuser permissions check which returned a list of permissions without a
label
parameter specified.View before:
View after:
Testing instructions (if applicable)