mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
organization scope in operation
This commit is contained in:
parent
ca9c8aeb58
commit
6cdde65b80
3 changed files with 6 additions and 2 deletions
|
|
@ -411,7 +411,7 @@
|
|||
transition: background-color 0.3s ease;
|
||||
border-bottom: 1px solid var(--slate5);
|
||||
display: flex;
|
||||
align-items:baseline;
|
||||
align-items:flex-start;
|
||||
padding: 12px;
|
||||
gap: 10px;
|
||||
|
||||
|
|
|
|||
|
|
@ -189,6 +189,10 @@ export class GroupPermissionsControllerV2 {
|
|||
|
||||
const granularPermissions = await this.granularPermissionsService.get(granularPermissionsId);
|
||||
const group = granularPermissions.group;
|
||||
console.log('logging user');
|
||||
|
||||
console.log(user);
|
||||
|
||||
validateGranularPermissionUpdateOperation(group, user.organizationId);
|
||||
return await this.granularPermissionsService.update(granularPermissionsId, {
|
||||
group: group,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export function validateGranularPermissionCreateOperation(group: GroupPermission
|
|||
}
|
||||
|
||||
export function validateGranularPermissionUpdateOperation(group: GroupPermissions, organizationId: string) {
|
||||
if (group.organizationId === organizationId) throw new BadRequestException(ERROR_HANDLER.GROUP_DOES_NOT_EXIST);
|
||||
if (group.organizationId !== organizationId) throw new BadRequestException(ERROR_HANDLER.GROUP_DOES_NOT_EXIST);
|
||||
if (group.name === USER_ROLE.ADMIN)
|
||||
throw new BadRequestException(ERROR_HANDLER.ADMIN_DEFAULT_GROUP_GRANULAR_PERMISSIONS);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue