Skip to content

Commit

Permalink
Update schema for TIM-1307
Browse files Browse the repository at this point in the history
  • Loading branch information
Johennes committed May 28, 2024
1 parent 01d3af9 commit 9193241
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 33 deletions.
6 changes: 6 additions & 0 deletions src/schema/examples/permissionConfig.domain-exception.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"defaultSetting": "block all",
"domainExceptions": {
"hassel.hoff": {}
}
}
6 changes: 3 additions & 3 deletions src/schema/examples/permissionConfig.user-exception.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"defaultSetting": "block all",
"userException": [{
"mxid": "@david:hassel.hoff"
}]
"userExceptions": {
"@david:hassel.hoff": {}
}
}
45 changes: 15 additions & 30 deletions src/schema/permissionConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,23 @@
"block all"
]
},
"groupException": {
"type": "array",
"uniqueItems": true,
"items": {
"groupName": {
"description": "The name of the group to be in-/excluded",
"type": "string",
"enum": [
"myLocalContactList"
]
"domainExceptions": {
"type": "object",
"description": "The map of servers to in-/exclude. This is a mapping of Matrix server name (https://spec.matrix.org/v1.3/appendices/#server-name) to empty object.",
"patternProperties": {
"^.*$": {
"type": "object",
"description": "An empty object for future enhancement"
}
}
},
"domainException": {
"type": "array",
"uniqueItems": true,
"items": {
"domain": {
"description": "The name of the domain to be in-/excluded",
"type": "string",
"pattern": "^((?!-)[A-Za-z0-9-]{1, 63}(?<!-)\\.)+[A-Za-z]{2, 6}$"
}
}
}
},
"userException": {
"type": "array",
"uniqueItems": true,
"items": {
"mxid": {
"description": "The MXID of the user to be in-/excluded",
"type": "string",
"pattern": "^@[a-z0-9._=/-]+:[a-zA-Z0-9.-]+$"
"userExceptions": {
"type": "object",
"description": "The map of users to in-/exclude. This is a mapping of Matrix user ID (https://spec.matrix.org/v1.3/appendices/#user-identifiers) to empty object.",
"patternProperties": {
"^@.*$": {
"type": "object",
"description": "An empty object for future enhancement"
}
}
}
Expand Down

0 comments on commit 9193241

Please sign in to comment.