Skip to content

Commit b2feabb

Browse files
committed
refactor(api): simplify role creation logic by removing enterprise feature checks and using user context directly
1 parent bc10793 commit b2feabb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/meteor/ee/server/api/roles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ API.v1.addRoute(
104104
throw new Meteor.Error('error-invalid-role-properties', 'The role properties are invalid.');
105105
}
106106

107-
const userId = Meteor.userId();
107+
const { userId } = this;
108108

109109
if (!userId || !(await hasPermissionAsync(userId, 'access-permissions'))) {
110110
throw new Meteor.Error('error-action-not-allowed', 'Accessing permissions is not allowed');

0 commit comments

Comments
 (0)