Files
mattermost-webapp/plugins/test
Jesse Hallam 52ff2499a3 MM-21707: enable backstage link for only bots (#4883)
* MM-21707: enable backstage link for only bots

Show the link to the backstage (aka `Integrations`) even if only bot accounts are enabled. Previously, if all of slash commands, webhooks and oAuth were disabled, but bot account creation was enabled, this entry would still be suppressed.

Note that the permissions gate on this feature remains slightly inaccurate: if a subset of the backstage features are enabled, but the user in question has non-intersection permissions (i.e.  `MANAGE_SLASH_COMMANDS` but only `OAUTH` enabled), they'll see the link but end up at a blank page. This pull request does not change that behaviour.

Fixes: https://mattermost.atlassian.net/browse/MM-21707

* Address code review feedback:

* Displaying "Integrations" in the main menu is now gated on whether or
not the permission to manage bots is present. It does not matter if bot
creation is enabled.
* Displaying "Bots" in the backstage sidebar is now correctly gated on
the same permission, taking into account bots are a system permission
while others are team permissions.

* undo unintentional move

* clarify someIntegrationsEnabled && showIntegrations

* group can/enable variables

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-03-09 16:16:53 -03:00
..