Skip to content

Commit

Permalink
teams can have generic namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
steam0r committed Oct 24, 2024
1 parent 8d4535e commit 9921609
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions shared/api/utils/shared_ops_util.js
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,14 @@ export default class SharedOpsUtil extends SharedUtil
return opname.startsWith(this.PREFIX_TEAMOPS);
}

isOpOfTeam(opName, team)
{
if (!opName) return false;
if (!team) return false;
const namespaces = [...team.namespaces, ...team.extensions];
return namespaces.some((ns) => { return opName.startsWith(ns); });
}

isTeamOpOfTeam(opName, team)
{
if (!this.isTeamOp(opName)) return false;
Expand Down

0 comments on commit 9921609

Please sign in to comment.