mirror of
https://github.com/xtool-org/xtool.git
synced 2026-02-04 11:53:30 +01:00
Clean up some entitlements code (#165)
- We already do the `isFree` declarations in `DeveloperServiceCapability.swift`. Don't need to duplicate it on the entitlement types. - Add support for creating capabilities with raw names
This commit is contained in:
@@ -23,6 +23,16 @@ public struct DeveloperServicesCapability: Sendable, Hashable {
|
||||
self.isFree = isFree
|
||||
self.settings = settings
|
||||
}
|
||||
|
||||
public init(
|
||||
rawName: String,
|
||||
isFree: Bool,
|
||||
settings: [Components.Schemas.CapabilitySetting]? = nil
|
||||
) {
|
||||
self.capabilityType = .init(value2: rawName)
|
||||
self.isFree = isFree
|
||||
self.settings = settings
|
||||
}
|
||||
}
|
||||
|
||||
protocol EntitlementWithCapability: Entitlement {
|
||||
|
||||
Reference in New Issue
Block a user