Skip to content

Commit

Permalink
CB-5123 fix: after review
Browse files Browse the repository at this point in the history
  • Loading branch information
Wroud committed Aug 8, 2024
1 parent d83ee57 commit 61720ff
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 61720ff

Please sign in to comment.