Skip to content

Commit

Permalink
disable the view checkboxes if read or write is already disabled on p…
Browse files Browse the repository at this point in the history
…roject level
  • Loading branch information
foxriver76 committed Jan 15, 2024
1 parent f06a538 commit f957448
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/src/Toolbar/ProjectsManager/PermissionsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export default class PermissionsDialog extends React.Component<PermissionsDialog
}}
>
<Checkbox
disabled={user === this.ADMIN_USER || activeUser !== this.ADMIN_USER}
disabled={user === this.ADMIN_USER || activeUser !== this.ADMIN_USER || !this.state.projectPermissions.get(user)?.read}
checked={this.state.viewPermissions[view]?.get(user)?.read}
onClick={() => {
const newState = this.state;
Expand All @@ -253,7 +253,7 @@ export default class PermissionsDialog extends React.Component<PermissionsDialog
/>
{I18n.t('Read')}
<Checkbox
disabled={user === this.ADMIN_USER || activeUser !== this.ADMIN_USER}
disabled={user === this.ADMIN_USER || activeUser !== this.ADMIN_USER || !this.state.projectPermissions.get(user)?.write}
checked={this.state.viewPermissions[view]?.get(user)?.write}
onClick={() => {
const newState = this.state;
Expand Down

0 comments on commit f957448

Please sign in to comment.