Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/CB-5123-license-status-insuffici…
Browse files Browse the repository at this point in the history
…ent-amount-users' into CB-5123-license-status-insufficient-amount-users
  • Loading branch information
DenisSinelnikov committed Aug 8, 2024
2 parents 14185a8 + 61720ff commit ee049ad
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 24 deletions.
32 changes: 14 additions & 18 deletions webapp/packages/core-root/src/DefaultNavigatorSettingsResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,7 @@ export class DefaultNavigatorSettingsResource extends CachedDataResource<Default
super(() => null, undefined, []);
this.sync(serverConfigResource);

this.update = {
hideFolders: false,
hideSchemas: false,
hideVirtualModel: false,
mergeEntities: false,
showOnlyEntities: false,
showSystemObjects: false,
showUtilityObjects: false,
};
this.update = getDefaultNavigatorSettings();

makeObservable<this, 'syncUpdateData'>(this, {
update: observable,
Expand Down Expand Up @@ -66,15 +58,7 @@ export class DefaultNavigatorSettingsResource extends CachedDataResource<Default
if (this.data) {
Object.assign(this.update, this.data);
} else {
this.update = {
hideFolders: false,
hideSchemas: false,
hideVirtualModel: false,
mergeEntities: false,
showOnlyEntities: false,
showSystemObjects: false,
showUtilityObjects: false,
};
this.update = getDefaultNavigatorSettings();
}
}

Expand Down Expand Up @@ -105,3 +89,15 @@ export class DefaultNavigatorSettingsResource extends CachedDataResource<Default
Object.assign(this.update, defaultNavigatorSettings);
}
}

function getDefaultNavigatorSettings(): NavigatorSettingsInput {
return {
hideFolders: false,
hideSchemas: false,
hideVirtualModel: false,
mergeEntities: false,
showOnlyEntities: false,
showSystemObjects: false,
showUtilityObjects: false,
};
}
8 changes: 2 additions & 6 deletions webapp/packages/core-root/src/PermissionsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,10 @@ export enum EPermission {}
@injectable()
export class PermissionsService {
get publicDisabled(): boolean {
if (
return (
this.serverConfigResource.configurationMode ||
(this.serverLicenseStatusResource?.licenseRequired && !this.serverLicenseStatusResource.licenseValid)
) {
return true;
}

return false;
);
}

constructor(
Expand Down

0 comments on commit ee049ad

Please sign in to comment.