-
Notifications
You must be signed in to change notification settings - Fork 2.7k
MM-10793: Handle the show/hide custom emojis in menu using permissions #1290
Conversation
if (haveITeamPermission(state, {team: t.id, permission: Permissions.MANAGE_EMOJIS})) { | ||
canCreateCustomEmoji = true; | ||
break; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😞
@@ -23,6 +25,16 @@ function mapStateToProps(state) { | |||
const enableCommands = config.EnableCommands === 'true'; | |||
const enableOAuthServiceProvider = config.EnableOAuthServiceProvider === 'true'; | |||
|
|||
let canCreateCustomEmoji = haveISystemPermission(state, {permission: Permissions.MANAGE_EMOJIS}); | |||
if (!canCreateCustomEmoji) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I saw a discussion about this, but to clarify, is it the case that if I have team-level permission to create custom emojis, I can create custom emojis anywhere, since custom emojis are system wide not team wide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that's the unfortunate case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, It's exactly that. This is the quick solution to migrate emoji permissions to the permissions system. But the plan is to include a nullable "TeamId" field in the Custom emojis, so we'll be able to allow users to have team custom emojis and system custom emojis, and the manage_emojis permissions will behave like the other permissions.
merging to the release branch |
* MM-10762: Adjusts team and channel role changes to support new permissions schemes. (#1293) * Adds next Redux commit. (#1294) * MM-10793: Handle the show/hide custom emojis in menu using permissions (#1290) * fix missing users' status indicators on more DM modal (#1279) * MM-10772 - Updating permissions changes (#1284) * MM-10772 - Updating permissions changes * Updating permissions stuff * Updating button spacing * Updating team icons * Updating test snapshots * Minor 5.0 Bug fixes (#1289) * MM-10733 - Updating UI for posts * MM-10780 - Updating emoji reaction tooltip * MM-10713 Fixed collapsed post colour in permalink view (#1291) * MM-10602 Removed extra space from OpenGraph preview for links without a description (#1276) * MM-10602 Removed extra space from OpenGraph preview for links without a description * Removed unnecessary div
* MM-10762: Adjusts team and channel role changes to support new permissions schemes. (#1293) * Adds next Redux commit. (#1294) * MM-10793: Handle the show/hide custom emojis in menu using permissions (#1290) * fix missing users' status indicators on more DM modal (#1279) * MM-10772 - Updating permissions changes (#1284) * MM-10772 - Updating permissions changes * Updating permissions stuff * Updating button spacing * Updating team icons * Updating test snapshots * Minor 5.0 Bug fixes (#1289) * MM-10733 - Updating UI for posts * MM-10780 - Updating emoji reaction tooltip * MM-10713 Fixed collapsed post colour in permalink view (#1291) * MM-10602 Removed extra space from OpenGraph preview for links without a description (#1276) * MM-10602 Removed extra space from OpenGraph preview for links without a description * Removed unnecessary div * MM-10767: Sort the teams in the teams selector modal (#1299) * translations PR 20180604 (#1286) * Fix typo (platform --> mattermost) (#1300) * MM-10555 Update outgoing webhook content-type help text (#1287) * Update outgoing webhook content-type help text * Update styling * More text updates * fix permission error on channel_converted event (#1301) * Minor 5.0 bugs (#1296) * MM-10795 - Fixing post control menu overlap * Updaing post control hover * MM-10798 - Fixing notification badge on t-sidebar
* MM-10762: Adjusts team and channel role changes to support new permissions schemes. (#1293) * Adds next Redux commit. (#1294) * MM-10793: Handle the show/hide custom emojis in menu using permissions (#1290) * fix missing users' status indicators on more DM modal (#1279) * MM-10772 - Updating permissions changes (#1284) * MM-10772 - Updating permissions changes * Updating permissions stuff * Updating button spacing * Updating team icons * Updating test snapshots * Minor 5.0 Bug fixes (#1289) * MM-10733 - Updating UI for posts * MM-10780 - Updating emoji reaction tooltip * MM-10713 Fixed collapsed post colour in permalink view (#1291) * MM-10602 Removed extra space from OpenGraph preview for links without a description (#1276) * MM-10602 Removed extra space from OpenGraph preview for links without a description * Removed unnecessary div * MM-10767: Sort the teams in the teams selector modal (#1299) * translations PR 20180604 (#1286) * Fix typo (platform --> mattermost) (#1300) * MM-10555 Update outgoing webhook content-type help text (#1287) * Update outgoing webhook content-type help text * Update styling * More text updates * fix permission error on channel_converted event (#1301) * Minor 5.0 bugs (#1296) * MM-10795 - Fixing post control menu overlap * Updaing post control hover * MM-10798 - Fixing notification badge on t-sidebar * MM-10789: propagate post channel_mentions to Markdown (#1304) The `post.props.channel_mentions` structure sent by the server needed to be passed to the Markdown component to allow merging with the already known channels for linking. * Fix color settings in the admin console and announcement setting disabling (#1309) * Minor 5.0 Bug fixes (#1305) * MM-10811 - Fixing overflow on long posts * Removing overflow from post-message * Updating thread view * MM-10848 - Updating username line-height * MM-10806: Fix for no search highlighting. (#1307) * MM-10806: Fix for no search highlighting. * MM-10806: Changes options. * MM-10844: maximum file size is a TYPE_NUMBER (#1310)
Summary
The emojis option in the menus wasn't based in permissions. This commit fix that problem.
Ticket Link
MM-10793
Checklist
make check-style
to check for style errors (required for all pull requests)make test
to ensure unit and component tests passed