Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

Neon-20
Copy link
Contributor

@Neon-20 Neon-20 commented Jun 20, 2024

What does this PR do?

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected)
  • I have added a Docs issue here if this PR makes changes that would require a documentation change
  • I have added or modified automated tests that prove my fix is effective or that my feature works (PRs might be rejected if logical changes are not properly tested)

Copy link

vercel bot commented Jun 20, 2024

@Neon-20 is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added this to the Community Only milestone Jun 20, 2024
@github-actions github-actions bot added event-types area: event types, event-types Low priority Created by Linear-GitHub Sync ✅ good first issue Good for newcomers 🐛 bug Something isn't working labels Jun 20, 2024
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Jun 20, 2024
@graphite-app graphite-app bot requested a review from a team June 20, 2024 20:37
Copy link

graphite-app bot commented Jun 20, 2024

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) &&
Copy link
Contributor

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

Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@hariombalhara hariombalhara left a 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.

@anikdhabal
Copy link
Contributor

Hey Pranav thanks for the work. But this pr #15511 was submitted earlier and handled it correctly.

@anikdhabal anikdhabal closed this Jun 29, 2024
@dosubot dosubot bot modified the milestone: Community Only Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working community Created by Linear-GitHub Sync event-types area: event types, event-types ✅ good first issue Good for newcomers Low priority Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3959] Remove/Disable Duplicate button in Read Only mode of an event-type
5 participants