Skip to content

Commit

Permalink
Allow all users to cancel tasks for now (#906)
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth authored Feb 23, 2024
1 parent a00a19a commit 988f5c5
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions packages/dashboard/src/components/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ export function getActionText(action: string): string {

export class Enforcer {
static canCancelTask(profile: UserProfile): boolean {
if (profile.user.is_admin) {
return true;
}
// for (const p of profile.permissions) {
// if (p.authz_grp === task.authz_grp && p.action === RmfAction.TaskCancel) {
// return true;
// }
// if (profile.user.is_admin) {
// return true;
// }
return false;
// // for (const p of profile.permissions) {
// // if (p.authz_grp === task.authz_grp && p.action === RmfAction.TaskCancel) {
// // return true;
// // }
// // }
// return false;

// FIXME: Allow all users to cancel for now
return true;
}
}

0 comments on commit 988f5c5

Please sign in to comment.