Skip to content

Commit 0b9cb98

Browse files
committed
wip
1 parent f39e924 commit 0b9cb98

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

specs/definitions/signed_docs/signers.cue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ _allAdminRoles: or(_allAdminRolesList)
4949
}
5050

5151
// Listed collaborators can post updated versions based on the metadata field as a source of collaborators information
52-
#collaboratorsDef: "collaborators" | "ref" | *"excluded" | "what_the_fuck"
52+
#collaboratorsDef: "collaborators" | "ref" | *"excluded"
5353

5454
#allowedUpdaters: {
5555
collaborators: #collaboratorsDef

specs/generators/packages/spec/src/spec/signers.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
"""Signers Specification."""
22

3-
from pydantic import BaseModel, ConfigDict, Field
3+
from pydantic import BaseModel, ConfigDict, Field, Enum
4+
5+
6+
class Collaborators(str, Enum):
7+
"""Signders Collaborators Specification."""
8+
9+
collaborators_field_based = "collaborators"
10+
ref_field_based = "ref"
11+
excluded = "excluded"
412

513

614
class AllowedRoles(BaseModel):
@@ -15,9 +23,8 @@ class AllowedRoles(BaseModel):
1523
class AllowedUpdaters(BaseModel):
1624
"""Allowed Updaters Specification."""
1725

18-
collaborators: bool = Field(default=False)
26+
collaborators: Collaborators
1927
author: bool = Field(default=True)
20-
any: bool = Field(default=False)
2128

2229
model_config = ConfigDict(extra="forbid")
2330

0 commit comments

Comments
 (0)