Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property "permission" in slash commands of custom apps #14739

Closed
ifantom opened this issue Jun 4, 2019 · 0 comments · Fixed by #14741
Closed

Property "permission" in slash commands of custom apps #14739

ifantom opened this issue Jun 4, 2019 · 0 comments · Fixed by #14741
Assignees
Milestone

Comments

@ifantom
Copy link
Contributor

ifantom commented Jun 4, 2019

Description:

ISlashCommand interface has "permission" property
Снимок экрана 2019-06-04 в 21 02 38

But if you mention some permission client without mentioned permission can use this command.
This property isn't used in registration of commands for custom apps.

registerCommand(command, appId) {

But this property is used in default commands registration.

slashCommands.add = function _addingSlashCommand(command, callback, options = {}, result, providesPreview = false, previewer, previewCallback) {

Steps to reproduce:

  1. Create custom application
  2. Add custom slash command for created application with permission property
  3. Disable mentioned permission for client
  4. Use created command by client without mentioned permission

Expected behavior:

You can't use the command
image

Actual behavior:

You can use the command.

Server Setup Information:

  • Version of Rocket.Chat Server: 1.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants