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) {