Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-27909: Add shared channel permission #6555

Merged
merged 10 commits into from
Oct 26, 2020
Merged

MM-27909: Add shared channel permission #6555

merged 10 commits into from
Oct 26, 2020

Conversation

agnivade
Copy link
Member

@agnivade agnivade commented Sep 25, 2020

We add the UI element to show the shared channel permission.
It is gated by the toggling of the config setting EnableSharedChannels.

For now, we just test with snapshots. Since it's not fully clear yet how the permissions and roles will look finally. Later we need a Cypress test to validate all of this. Ticket filed: https://mattermost.atlassian.net/browse/MM-29047

https://mattermost.atlassian.net/browse/MM-27909

Summary

Ticket Link

Related Pull Requests

Screenshots

sc

We add the UI element to show the shared channel permission.
It is gated by the toggling of the config setting EnableSharedChannels.

https://mattermost.atlassian.net/browse/MM-27909
@agnivade agnivade added 1: PM Review Requires review by a product manager 2: Dev Review Requires review by a core commiter Do Not Merge/Awaiting PR Awaiting another pull request before merging (e.g. server changes) 3: QA Review Requires review by a QA tester labels Sep 25, 2020
@agnivade agnivade added this to the v5.30.0 milestone Sep 25, 2020
i18n/en.json Outdated Show resolved Hide resolved
i18n/en.json Outdated Show resolved Hide resolved
@agnivade
Copy link
Member Author

agnivade commented Oct 2, 2020

Gentle ping @mkraft and @wiersgallak

@agnivade agnivade requested a review from wiggin77 October 5, 2020 16:05
And changed the right string
Copy link
Member

@wiggin77 wiggin77 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@wiersgallak wiersgallak removed the 1: PM Review Requires review by a product manager label Oct 6, 2020
@agnivade agnivade removed the 2: Dev Review Requires review by a core commiter label Oct 17, 2020
@srkgupta srkgupta requested review from srkgupta and removed request for lindalumitchell October 21, 2020 04:39
Copy link
Contributor

@srkgupta srkgupta left a comment

Choose a reason for hiding this comment

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

Hi @agnivade

I am testing this PR along with its dependent PRs and I am seeing the following issues.

  1. The Managed Shared Channels permission is only displayed for All Members and Sysadmins. Its not displayed for Channel Admins and Team Admins as shown in this screenshot.

Screenshot 2020-10-21 at 7 40 22 PM

Screenshot 2020-10-21 at 7 40 59 PM

  1. Manage Shared Channel permission is not displayed in Team Override Schemes. It is expected to be displayed even in this screen.

  2. Manage Shared Channel permission is displayed on an E10 instance as well. I believe Shared Channels is only a E20 feature and hence this permission should only be displayed on E20 instance.

@agnivade
Copy link
Member Author

Hi @srkgupta

  1. It's because it's a system-scoped permission.
  2. Same as above.
  3. The E10/E20 thing needs to be done from the server side. The ticket is https://mattermost.atlassian.net/browse/MM-29027. I have updated the ticket to note that the permission in the UI should be shown appropriately.

@srkgupta
Copy link
Contributor

Hi @agnivade,
Regarding 1 & 2, can you please help me understand whats a system scoped permission is and why it needs to be only displayed for All Members and Sysadmins and not for Channel and Team Admins.

Regarding 3, we generally test all the dependent PRs together and comment on one of the PRs. In this case, this PR was tested along with the server PR mattermost/mattermost#15601 and it was found that the new permission is also displayed on E10 instance, which is wrong and should be fixed.

@agnivade
Copy link
Member Author

From what I understand, a system scoped permission is for the entire system and not tied to a channel or a team. You will see other various system scoped permission behave in the same way. They don't appear for channel or team admins because it's not at that level. For more information you can follow the conversation that happened on mattermost/mattermost#15601. We agreed to change the scope from channel to system.

On E20, we are still in the process of creating the basic scaffolding needed for this feature. So things may not be in the perfect order. If it's required to be done as part of this PR, then we can park this PR until that ticket is merged, and then I can incorporate the changes after that.

Copy link
Contributor

@srkgupta srkgupta left a comment

Choose a reason for hiding this comment

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

Thanks @agnivade. I have updated the ticket MM-27909 based on the issues 1 & 2 mentioned above. Regarding issue 3, as long as it is being tracked and will be handled in future PRs, it's fine. Tested the PR along with its dependent PRs and permission is showing up and working fine on System Console. Approving the PR.

@srkgupta srkgupta added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester labels Oct 26, 2020
@agnivade agnivade removed the Do Not Merge/Awaiting PR Awaiting another pull request before merging (e.g. server changes) label Oct 26, 2020
@agnivade agnivade merged commit 355ec70 into master Oct 26, 2020
@agnivade agnivade deleted the sharedperm branch October 26, 2020 10:24
calebroseland pushed a commit that referenced this pull request Oct 27, 2020
* MM-27909: Add shared channel permission

We add the UI element to show the shared channel permission.
It is gated by the toggling of the config setting EnableSharedChannels.

https://mattermost.atlassian.net/browse/MM-27909

* Fix i18n

* Improve text

* Fix config permission check

And changed the right string

* Fix snapshots

* change to system scoped

* Use new redux
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Nov 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation
Projects
None yet
6 participants