+
+ // When viewing the contents of a filter group, all contents should be treated as read only.
+ let inFilterGroup = false;
+ const { router } = getState();
+ if (isProjectRoute(router)) {
+ const projectUuid = getProjectPanelCurrentUuid(getState());
+ if (projectUuid !== undefined) {
+ const project = getResource<GroupResource>(projectUuid)(getState().resources);
+ if (project && project.groupClass === GroupClass.FILTER) {
+ inFilterGroup = true;
+ }
+ }
+ }
+
+ const isEditable = (isAdminUser || (resource || {} as EditableResource).isEditable) && !inFilterGroup;