Skip to content
Snippets Groups Projects
Commit 0453ff9e authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Allow bot call deleteOutgoingIntegration

parent d77e0751
No related merge requests found
Meteor.methods Meteor.methods
deleteOutgoingIntegration: (integrationId) -> deleteOutgoingIntegration: (integrationId) ->
if not RocketChat.authz.hasPermission @userId, 'manage-integrations' if not RocketChat.authz.hasPermission(@userId, 'manage-integrations') and not RocketChat.authz.hasPermission(@userId, 'manage-integrations', 'bot')
throw new Meteor.Error 'not_authorized' throw new Meteor.Error 'not_authorized'
integration = RocketChat.models.Integrations.findOne(integrationId) integration = RocketChat.models.Integrations.findOne(integrationId)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment