Aug 17 - Fix constants.swift error

This commit is contained in:
2026-08-17 16:52:04 -04:00
parent 607da7ae47
commit 7cbc514c39
+7 -1
View File
@@ -109,8 +109,14 @@ nonisolated enum Constants {
/// May change an issue's status / handler, and start a follow-up. /// May change an issue's status / handler, and start a follow-up.
/// Matches what the API actually accepts for these actions; the server /// Matches what the API actually accepts for these actions; the server
/// remains the authority and additionally enforces facility scope. /// remains the authority and additionally enforces facility scope.
///
/// Built from `inspectorRoles` (already a Set) rather than from an
/// array literal: `[a, b, c].union(...)` does not compile, because the
/// literal is typed as Array before `.union` is looked up, and Array
/// has no such member the annotation on the left does not reach back
/// into the receiver.
static let issueActors: Set<String> = static let issueActors: Set<String> =
[admin, director, projectManager].union(inspectorRoles) inspectorRoles.union([admin, director, projectManager])
static func isInspector(_ role: String) -> Bool { static func isInspector(_ role: String) -> Bool {
inspectorRoles.contains(role) inspectorRoles.contains(role)