From 7a875798fea9321bad2636040d9be2c30bc0fa8f Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sun, 12 Apr 2026 22:16:14 -0500 Subject: 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 --- Hutch/Models/RepositoryACL.swift | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Hutch/Models/RepositoryACL.swift (limited to 'Hutch/Models/RepositoryACL.swift') 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" + } + } +} -- cgit v1.2.3