-
Notifications
You must be signed in to change notification settings - Fork 44
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
yihan hide assign badges button from all but owner/admin class #771
Conversation
Hit @AriaYu927 I tested your PR with Volunteer, Admin and Core Team rights and it works as intended, the Assign Badge button is only displayed with Admin Rights: |
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.
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.
it has issues please check my video
HGN.APP.-.Google.Chrome.2023-04-15.15-44-25.mp4
You can fix this or much better will redo it on a new branch
It works on my end, check the video below. Thank you @AriaYu927 bandicam.2023-04-15.10-57-26-532.mp4 |
Hi @PrabhjotSembhi , thank you for pointing out the problem! I tested it on my end but I wasn't able to reproduce the issue. Here's the video: PR_771.mp4 |
Thank you for testing @KaixiangGU |
Don't close PRs if you can avoid it, fix them instead. |
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.
Hi @AriaYu927, I've tested your PR and it worked as expected.
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.
Thank you all, will merge this as soon as Prabhjot approves it too. Following up with him by DM. |
I found this I am facing this issue in development branch. I want others to check this so we can fix this bug if it this bug persist.
Description
Mainly changes explained:
Add conditional rendering on assign badges button. So, the button only shows up when the users is of Owner/Admin class or has assign badges permission.
How to test:
check into current branch
do
npm install
and...
to run this PR locallylog as different type of user
go to profile page→ Assign badges→ Choose→ Save
check if only owner, administrator and users who has the permission can see the button and assign badges.
Screenshots or videos of changes:
owner, administrator or other users who have assign badges permission:
users don't have assign badges permission: