Skip to content

Commit

Permalink
staff permissions optional
Browse files Browse the repository at this point in the history
  • Loading branch information
steam0r committed Nov 8, 2024
1 parent 4227523 commit c1c1951
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shared/api/utils/shared_ops_util.js
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ export default class SharedOpsUtil extends SharedUtil
return attachment;
}

userHasWriteRightsOp(user, opName, teams = [], project = null)
userHasWriteRightsOp(user, opName, teams = [], project = null, ignoreAdmin = false)
{
if (!user) return false;
if (!opName) return false;
Expand Down Expand Up @@ -847,9 +847,9 @@ export default class SharedOpsUtil extends SharedUtil
}
return inTeam;
}
if (user.isStaff)
if (!ignoreAdmin && user.isStaff)
{
// only staff and admins is allowed to edit everything else on dev
// only staff and admins are allowed to edit everything else on dev
return this._cables.isDevEnv();
}
return false;
Expand Down

0 comments on commit c1c1951

Please sign in to comment.