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

groups: fix issue where admins can't delete if they're not the host #3404

Merged

Conversation

patosullivan
Copy link
Member

Apparently the is-admin util has been broken. It was scrying into the wrong place to check if a user is an admin. It only appeared to work because of an early return where we check if the ship is also the host of the channel.

If an admin was not also the host of the channel, then they were not able to delete messages in that channel.

@patosullivan patosullivan requested a review from Fang- April 9, 2024 20:45
Copy link

linear bot commented Apr 9, 2024

Copy link
Member

@Fang- Fang- left a comment

Choose a reason for hiding this comment

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

As discussed out of band, this indeed matches the group-wide permission scry endpoint we do implement:

[%fleet ship=@ %is-bloc ~]

Good catch, thank you!

@patosullivan patosullivan merged commit 5c944c0 into develop Apr 9, 2024
1 check passed
@patosullivan patosullivan deleted the po/land-1756-group-admins-cant-delete-if-not-host branch April 9, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants