diff options
| author | Christian Cleberg <[email protected]> | 2026-04-12 22:16:14 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-04-12 22:16:14 -0500 |
| commit | 7a875798fea9321bad2636040d9be2c30bc0fa8f (patch) | |
| tree | b0569f6413454f423c4ddaa6b25307bc987ef81d /Hutch/Models/RepositoryACL.swift | |
| parent | 86bcd9452d3107f68aca085e03e69b02667c0dbb (diff) | |
| download | hutch-7a875798fea9321bad2636040d9be2c30bc0fa8f.tar.gz hutch-7a875798fea9321bad2636040d9be2c30bc0fa8f.tar.bz2 hutch-7a875798fea9321bad2636040d9be2c30bc0fa8f.zip | |
feat: add repository acl management
Implements: https://todo.sr.ht/~ccleberg/hutch/39
Implements: https://todo.sr.ht/~ccleberg/hutch/40
Implements: https://todo.sr.ht/~ccleberg/hutch/41
Diffstat (limited to 'Hutch/Models/RepositoryACL.swift')
| -rw-r--r-- | Hutch/Models/RepositoryACL.swift | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Hutch/Models/RepositoryACL.swift b/Hutch/Models/RepositoryACL.swift new file mode 100644 index 0000000..e5f5eb1 --- /dev/null +++ b/Hutch/Models/RepositoryACL.swift @@ -0,0 +1,20 @@ +import Foundation + +struct RepositoryACLEntry: Codable, Sendable, Identifiable, Hashable { + let id: Int + let mode: AccessMode + let entity: Entity +} + +extension AccessMode { + var shortLabel: String { rawValue } + + var displayName: String { + switch self { + case .ro: + "Read Only" + case .rw: + "Read/Write" + } + } +} |
