summaryrefslogtreecommitdiff
path: root/Hutch/Models/RepositoryACL.swift
blob: e5d93f68cc66d6e0a64a3c6742c503900fa17da1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import Foundation

nonisolated struct RepositoryACLEntry: Codable, Sendable, Identifiable, Hashable {
    let id: Int
    let mode: AccessMode
    let entity: Entity
}

nonisolated extension AccessMode {
    var shortLabel: String { rawValue }

    var displayName: String {
        switch self {
        case .ro:
            "Read Only"
        case .rw:
            "Read/Write"
        }
    }
}