Skip to content

Commit

Permalink
CB-4700 allow editing for admin
Browse files Browse the repository at this point in the history
  • Loading branch information
devnaumov committed Feb 21, 2024
1 parent 30677fc commit 11dedd7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion webapp/packages/plugin-data-viewer/src/DataViewerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ export class DataViewerService {
) {}

isDataEditable(connection: Connection) {
const isAdmin = this.sessionPermissionsResource.has(EAdminPermission.admin);
const disabled = this.dataViewerSettingsService.settings.getValue('disableEdit');
return !disabled && !connection.readOnly;

if (disabled) {
return isAdmin;
}

return !connection.readOnly;
}
}

0 comments on commit 11dedd7

Please sign in to comment.