-
Notifications
You must be signed in to change notification settings - Fork 67
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
Ensures that only staff are allowed to assign the journal manager role #4143
Conversation
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.
As discussed, we need a test case as with other security issues. Otherwise looks good
@mauromsl test now in place. I've added an explicit kwarg to |
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.
Added some thoughts, not even comments so I'm green ticking
Two issues here:
AccountRoleSerializer
'svalidate
method intoPreprintSerializer
.enrol_users
view was not filtering out the journal manager role properly.2 would not have been a serious issue without 1, as the API would have refused to assign the role and let the non-staff user know.
Additionally, I've renamed the roles variable as it shadows a an outer scope definition.
Closes #4141