From 3acae55b9f30bcbcf72751c933a9c3cd616810a4 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Tue, 27 Aug 2019 13:09:56 -0300 Subject: [PATCH] fix permissonId argument --- app/authorization/client/views/permissions.js | 2 +- app/models/server/models/Permissions.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/authorization/client/views/permissions.js b/app/authorization/client/views/permissions.js index 5f5d33957cad..d03ac7d52cbb 100644 --- a/app/authorization/client/views/permissions.js +++ b/app/authorization/client/views/permissions.js @@ -191,7 +191,7 @@ Template.permissionsTable.events({ const action = ~permission.roles.indexOf(role) ? 'authorization:removeRoleFromPermission' : 'authorization:addPermissionToRole'; - return Meteor.call(action, permission, role); + return Meteor.call(action, permissionId, role); }, }); diff --git a/app/models/server/models/Permissions.js b/app/models/server/models/Permissions.js index defeabe5b593..d1b17ce64698 100644 --- a/app/models/server/models/Permissions.js +++ b/app/models/server/models/Permissions.js @@ -11,7 +11,7 @@ export class Permissions extends Base { } findOneById(_id) { - return this.findOne(_id); + return this.findOne({ _id }); } createOrUpdate(name, roles) {