Skip to content

Commit

Permalink
CB-4700 change if logic
Browse files Browse the repository at this point in the history
  • Loading branch information
devnaumov committed Feb 21, 2024
1 parent c7cf17e commit 680bf92
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions webapp/packages/plugin-data-viewer/src/DataViewerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ export class DataViewerService {
) {}

isDataEditable(connection: Connection) {
if (connection.readOnly) {
return false;
}

const isAdmin = this.sessionPermissionsResource.has(EAdminPermission.admin);
const disabled = this.dataViewerSettingsService.settings.getValue('disableEdit');

if (disabled) {
return isAdmin;
}

return !connection.readOnly;
return isAdmin || !disabled;
}
}

0 comments on commit 680bf92

Please sign in to comment.