-
Notifications
You must be signed in to change notification settings - Fork 7k
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
fix: Remove/Disable Duplicate button in Read Only mode #15515
Conversation
@Neon-20 is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Graphite Automations"Add community label" took an action on this PR • (06/20/24)1 label was added to this PR based on Keith Williams's automation. "Add consumer team as reviewer" took an action on this PR • (06/20/24)1 reviewer was added to this PR based on Keith Williams's automation. |
</DropdownMenuItem> | ||
</> | ||
)} | ||
{(group.metadata?.readOnly === false || group.metadata.readOnly === null) && |
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 it would make more sense to avoid using metadata to solve this issue and actually check for the role of the member within the organization
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.
readOnly
at backend is computed based on user membership only. But metadata isn't needed here. There is a readOnly
variable already which is used to give similar treatment to other actions.
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.
@Neon-20 Thanks for the PR 🙏
Left a suggestion.
Hey Pranav thanks for the work. But this pr #15511 was submitted earlier and handled it correctly. |
What does this PR do?
Mandatory Tasks (DO NOT REMOVE)