-
Notifications
You must be signed in to change notification settings - Fork 11
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
978 plain user can't change his role. #984
978 plain user can't change his role. #984
Conversation
src/resources/users/UserForm.tsx
Outdated
@@ -42,6 +42,7 @@ export default function UserForm({ isEdit }: FormProps): React.ReactElement { | |||
role: 'rco-user' | |||
} | |||
const { record } = useEditContext() | |||
const isPowerUser = record?.role === '' |
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.
@TahaKhanAbdalli - we really need to check they are a power user: rco-power-user
Aah @TahaKhanAbdalli - I've realised there's a higher level of security here. For the Aah, but a non power-user could still manually navigate to |
Sure, I got your point. I will look into it tomorrow. |
I'm happy to leave the linter issue to you @TahaKhanAbdalli |
Aah, I've realised the issue isn't quite worded properly. If I'm not a power user I can't change anyone's role. I've just had a play, and we're deciding if the current record can be edited based upon if the current record is for a power user. The test should be for if |
Oky. |
Aah, I just changed my role from When I log out, I cannot log back in. Well, I can log back in - but I have to go through the password reset process (20300/20300). I don't think we should erase the password when the role is changed. |
Hi Ian, |
|
Could you please double-check where we are with this issue @TahaKhanAbdalli ? |
Sure. |
The issue has been addressed. Now, if a user is an |
Approach changed to fix this issue in PR #988, therefore closing this PR. |
fixes #978