From 992160964529db673833b921844b3ae864bfad9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Thu, 24 Oct 2024 18:07:30 +0200 Subject: [PATCH] teams can have generic namespaces --- shared/api/utils/shared_ops_util.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shared/api/utils/shared_ops_util.js b/shared/api/utils/shared_ops_util.js index 7fac6d1..65d8a2e 100644 --- a/shared/api/utils/shared_ops_util.js +++ b/shared/api/utils/shared_ops_util.js @@ -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;