function normalizeScopeList(scopes: readonly string[]): string[] { const out = new Set<string>(); for (const scope of scopes) { const trimmed = scope.trim(); if (trimmed) {
out.add(trimmed);
}
} return [...out];
}
function operatorScopeSatisfied(requestedScope: string, granted: Set<string>): boolean { if (!requestedScope.startsWith(OPERATOR_SCOPE_PREFIX)) { returnfalse;
} if (granted.has(OPERATOR_ADMIN_SCOPE)) { returntrue;
} if (requestedScope === OPERATOR_READ_SCOPE) { return granted.has(OPERATOR_READ_SCOPE) || granted.has(OPERATOR_WRITE_SCOPE);
} if (requestedScope === OPERATOR_WRITE_SCOPE) { return granted.has(OPERATOR_WRITE_SCOPE);
} return granted.has(requestedScope);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.