mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
Permissions and sync groups fixes (#12555)
* data source permissions and sync groups fixes * update
This commit is contained in:
parent
b9303fa4ab
commit
c5703c8438
2 changed files with 2 additions and 3 deletions
|
|
@ -348,7 +348,7 @@ export class AuthUtilService implements IAuthUtilService {
|
|||
|
||||
// IF current role is empty -> user not exist
|
||||
// IF new role not equals current one
|
||||
if (!currentRole || newRole !== currentRole) {
|
||||
if (!currentRole || (newRole !== currentRole && groups.length > 0)) {
|
||||
await this.roleUtilService.editDefaultGroupUserRole(
|
||||
organizationId,
|
||||
{ newRole, userId, currentRole: currentRoleObj },
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ export class FeatureAbilityFactory extends AbilityFactory<FEATURE_KEY, Subjects>
|
|||
if (isBuilder) {
|
||||
// Only builder can do scope change, Get call is there on app builder
|
||||
can(FEATURE_KEY.SCOPE_CHANGE, DataSource);
|
||||
can(FEATURE_KEY.GET, DataSource);
|
||||
can(FEATURE_KEY.GET_FOR_APP, DataSource);
|
||||
}
|
||||
|
||||
|
|
@ -100,7 +99,7 @@ export class FeatureAbilityFactory extends AbilityFactory<FEATURE_KEY, Subjects>
|
|||
}
|
||||
|
||||
if (isAllViewable) {
|
||||
can([FEATURE_KEY.GET, FEATURE_KEY.GET_BY_ENVIRONMENT], DataSource);
|
||||
can([FEATURE_KEY.GET_BY_ENVIRONMENT], DataSource);
|
||||
return;
|
||||
}
|
||||
if (
|
||||
|
|
|
|||
Loading…
Reference in a new issue