Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions proto/role/v1.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ message Role_1 {

bytes roleId = 5 [(required) = true];
optional uint32 fromIndex = 6 [(required) = true];
optional string reason = 7;
}
4 changes: 4 additions & 0 deletions schema/role/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"type": "integer",
"minimum": 0,
"description": "This is the index of the auth core that this role applies to (identified by the `docId`) to apply this role from. E.g. documents in the auth core assigned this role from this index will be evaluated according to this role."
},
"reason": {
"type": "string",
"description": "This is an optional reason for why this role change was made. e.g. for blocking from the project or promoting to coordinator"
}
},
"required": ["schemaName", "roleId", "fromIndex"],
Expand Down
16 changes: 16 additions & 0 deletions test/fixtures/good-docs-completed.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,22 @@ export const goodDocsCompleted = [
},
expected: {},
},
{
doc: {
docId: cachedValues.docId,
versionId: cachedValues.versionId,
originalVersionId: cachedValues.originalVersionId,
schemaName: 'role',
createdAt: cachedValues.createdAt,
updatedAt: cachedValues.updatedAt,
links: [],
roleId: '6fd029a78243',
reason: 'Blocked forever',
fromIndex: 5,
deleted: false,
},
expected: {},
},
{
doc: {
docId: cachedValues.docId,
Expand Down
Loading