Skip to content

Conversation

@MarcosSpessatto
Copy link
Contributor

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

@MarcosSpessatto MarcosSpessatto changed the title Regression: Do not allow non-owners edit rooms or add users on federated rooms Regression: Do not allow non-owners edit rooms or add/remove users on federated rooms Jul 14, 2022
alansikora
alansikora previously approved these changes Jul 14, 2022
Copy link
Member

@sampaiodiego sampaiodiego left a comment

Choose a reason for hiding this comment

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

I added some comments, but I was thinking about the root cause of the issue.. maybe I need an explanation what the issue is 😬

because in theory only the room owner or an admin will have the permission to edit a room already.. maybe in case of a federated room there will be no subscription (do they have subscriptions?), so the owner check would fail, but for admin it not fail.. 🤔

@MarcosSpessatto
Copy link
Contributor Author

I added some comments, but I was thinking about the root cause of the issue.. maybe I need an explanation what the issue is 😬

because in theory only the room owner or an admin will have the permission to edit a room already.. maybe in case of a federated room there will be no subscription (do they have subscriptions?), so the owner check would fail, but for admin it not fail.. 🤔

Good point, so the first answer is: yes, they do have subscriptions, it's at the end of the day, a regular rocket.chat room, there's even no specific type to describe it, it's using the same as we use today (p, c, d, etc).

Also, in the case of the federated rooms, even the admins should now be able to edit that, I mean, for now, until we do not support any kind of permission/role from the Matrix side, we must allow only and only the owner to edit the things.

@ggazzo ggazzo changed the base branch from develop to feat/federation July 15, 2022 19:43
@ggazzo ggazzo requested a review from sampaiodiego July 15, 2022 19:44
@MarcosSpessatto MarcosSpessatto merged commit d97bc22 into feat/federation Jul 18, 2022
@MarcosSpessatto MarcosSpessatto deleted the regression/federation-disallow-edit-if-no-owner branch July 18, 2022 11:58
ggazzo pushed a commit that referenced this pull request Jul 18, 2022
… federated rooms (#26263)

* fix: do not allow non-owners edit or add users on federated rooms

* fix: do not allow non-owners to remove users from federated rooms

* fix: apply suggestion from review
ggazzo pushed a commit that referenced this pull request Jul 18, 2022
… federated rooms (#26263)

* fix: do not allow non-owners edit or add users on federated rooms

* fix: do not allow non-owners to remove users from federated rooms

* fix: apply suggestion from review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants