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

[MM-22276] Create Channel Moderation Widget #4881

Merged

Conversation

hahmadia
Copy link
Contributor

@hahmadia hahmadia commented Feb 11, 2020

Note to Self

  • Add cypress test cases and fix current test cases (Ask Rohitesh what behaviours should be tested)
  • Revert the redux hash to master after the redux PR has been merged
  • Add t('...') at end of file to generate the translations
  • Fix redux test cases Reverted some redux changes which fixed the test cases
  • Take photos of new design for Michael and show him
  • If create posts is initially unchecked, should I handle disabling mentions on front end or should it be disabled by backend?

Summary

Create channel moderation widget for channel permissions

Ticket Link

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

Related Pull Requests

Screenshots

image
image

@hahmadia hahmadia added the Work in Progress Not yet ready for review label Feb 11, 2020
@hahmadia hahmadia added this to the v5.22.0 milestone Feb 11, 2020
@hahmadia hahmadia changed the title Mm 22276 create channel moderation widget [MM-22276] Create Channel Moderation Widget Feb 11, 2020
@hahmadia hahmadia added 1: UX Review Requires review by a UX Designer Do Not Merge/Awaiting PR Awaiting another pull request before merging (e.g. server changes) and removed Work in Progress Not yet ready for review labels Feb 13, 2020
@hahmadia hahmadia added the 2: Dev Review Requires review by a core commiter label Feb 13, 2020
@mkraft mkraft self-requested a review February 13, 2020 19:56
@hahmadia hahmadia added the 3: QA Review Requires review by a QA tester label Feb 13, 2020
@srkgupta
Copy link
Contributor

srkgupta commented Mar 4, 2020

Some more issues:

  1. The Channel Moderation permissions should only be applicable to Channel Members and not Channel Admins and Team Admins. When I had removed the permission to Create Posts, Channel Mentions, Use Reactions and Manage Members, the permissions were removed for the Channel Admin as well as shown in this screenshot. A Channel Admin should still be able to create post, use channel mentions, use reactions etc.
    Screenshot 2020-03-04 at 4 27 00 PM

  2. If a sysadmin has made some changes in the Channel Moderation Settings widget and if user clicks on the System Scheme link displayed, there is no Discard Changes confirmation displayed. The user is taken directly to the System Schemes page. This might also be applicable for Team Override Schemes.

  3. By default when a member joins a public channel, the channel is marked as Read Only. However when the user reload the page, the channel becomes fine and user is able to create posts. Please check this GIF to demonstrate this issue.
    2020-03-04 16 37 35

  4. At times the changes made to the Channel Moderation Settings are not propagated correctly. As shown in this screenshot, the Post Reactions option was removed for Members. However the user still sees the option in UI. Although when user selects a new Reaction, nothing happens.
    Screenshot 2020-03-04 at 4 49 43 PM

  5. Similarly if the option to Create Posts was enabled on a Channel, after it was disabled previously, the changes are not propagated immediately as shown in this screenshot. It works fine after the page was reloaded.
    Screenshot 2020-03-04 at 4 52 57 PM

@fmunshi
Copy link
Contributor

fmunshi commented Mar 4, 2020

@srkgupta This PR and mattermost/mattermost#13845 only deal with the creation of channel schemes using the channel moderation widget - the actual enforcement of those permissions will not work without mattermost/mattermost#13813
Sorry if that was not clear as it seems a lot of the issues found deal with the enforcement of permissions as opposed to simply ensuring the roles are properly modified and schemes are created / deleted

@fmunshi fmunshi self-assigned this Mar 4, 2020
@srkgupta
Copy link
Contributor

srkgupta commented Mar 5, 2020

@fm2munsh
Regarding issue 6, I am not sure if the implemented fix is correct. Only the external links are opened in a new tab. Links to the different page on the same application should ideally be opening on the same tab itself. I have filed a seperate ticket for this since this issue is seen on other places in System Console as well.
https://mattermost.atlassian.net/browse/MM-23025

Can you please revert your fix for issue #6

Also, can you please fix the E2E test added. I have added some comments on it.

With regards to other issues 4,5,7,8,9, the scope wasn't clear. Some of the channel moderation settings were implemented immediately and some were not. Hence wanted to bring it to your attention.

@fmunshi
Copy link
Contributor

fmunshi commented Mar 5, 2020

@srkgupta I have modified the E2E test to ensure all checkboxes are checked at the start then uncheck all checkboxes and then ensure all checkboxes are unchecked

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 @hahmadia and @fm2munsh. The changes are looking good. The PR has been tested on localhost along with it's dependent server and redux PR and it LGTM. Approving the PR.

QA Notes: Testcases have been added at the epic level for this feature in the release spreadsheet & JIRA.

@srkgupta srkgupta added QA Review Done and removed 3: QA Review Requires review by a QA tester labels Mar 5, 2020
@fmunshi fmunshi removed 1: UX Review Requires review by a UX Designer Do Not Merge/Awaiting PR Awaiting another pull request before merging (e.g. server changes) labels Mar 5, 2020
@fmunshi fmunshi requested a review from sbishel March 5, 2020 15:35
@mkraft mkraft added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Mar 5, 2020
@hahmadia hahmadia merged commit e9ae037 into mattermost:master Mar 7, 2020
@hahmadia hahmadia deleted the MM-22276-CreateChannelModerationWidget branch March 7, 2020 03:48
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Mar 13, 2020
sowmiyamuthuraman pushed a commit to sowmiyamuthuraman/mattermost-webapp that referenced this pull request Apr 10, 2020
* initial commit

* WIP

* update styling

* Fix linting and remove dead code

* Fix type check

* update snapshot

* WIP

* finish channel moderation widget

* fix liniting

* fix filter

* fix types

* update en.json

* update channel moderations

* update scss

* update redux hash to pass type check

* update package and package lock

* Address reviewer comments and micahels styling comments

* fix linting and type checks

* update en.json

* Fix tests

* update tests

* revert

* fix not loading

* fix translations and refactor some code

* Message bug

* fix translations

* fix linting errors

* update redux hash

* fix translations and make camelCase

* fix inital setting of channel mentions

* update condition for create posts to be disabled

* add cypress test

* update permission snapshot

* update snapshot

* address PR comments

* Address PR comments

* make small change

* MM-22276 Update redux hash

* MM-22276 Dont load when channel id or team id undefined

* MM-22276 Fix linting

* MM-22276 Open scheme links in separate tab

* Revert "MM-22276 Open scheme links in separate tab"

This reverts commit eb0bb11.

* MM-22276 Fix E2E tests

* Update redux

Co-authored-by: fm2munsh <[email protected]>
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 QA Review Done
Projects
None yet
8 participants