From 68a318398a32008b03c7e0ea2c3ecf80d5af17fe Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 29 Aug 2024 03:02:58 +0530 Subject: [PATCH] Nc fix: Allow base invite for all user roles (#9368) * fix: allow base user invite for all users but restrict with roles lower than or equal * refactor: improved permission error * fix: base invite bug * refactor: permission error message --- packages/nocodb/src/utils/acl.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/utils/acl.ts b/packages/nocodb/src/utils/acl.ts index 59c5400c92..b54547fb7e 100644 --- a/packages/nocodb/src/utils/acl.ts +++ b/packages/nocodb/src/utils/acl.ts @@ -161,6 +161,8 @@ const permissionScopes = { // Webhooks 'hookTrigger', + + 'userInvite', ], }; @@ -232,7 +234,7 @@ const rolePermissions: commentsCount: true, auditListRow: true, - // userInvite: true, + userInvite: true, }, }, [ProjectRoles.COMMENTER]: { @@ -703,5 +705,5 @@ export function generateReadablePermissionErr( permissionDescriptions[permissionName] || `perform the action "${permissionName}"`; - return `You do not have permission to ${permissionDescription} with the roles: ${roleLabels}. Please contact support if you need further assistance.`; + return `You do not have permission to ${permissionDescription} with the roles: ${roleLabels}.`; }