Closed redmitry closed 4 years ago
This commit would be OK only if the contact belongs to one community. If we want support more than one community there must be an array of communities each of them having its own roles assigned.
"privelegies" : {
"title": "Communities the contact belogs to",
"type": "array",
"items": {
"type": "object",
"properties": {
"community_id": {
"title": "The community id where this contact belongs to",
"type": "string",
"foreign_keys": [
{
"schema_id": "Community",
"members": [ "." ]
}
],
"minLength": 7
},
"challenge_id": {
"title": "The challenge id the user has priviledges",
"type": "string",
"foreign_keys": [
{
"schema_id": "Challenge",
"members": [ "." ]
}
],
"minLength": 7
},
"roles": {
"title": "Community roles applied to the contact",
"type": "array",
"items": {
"type": "string",
"enum": [ "cmanager", "ccontributor" ]
}
}
}
}
}
Define "cmanager" and "ccontributor" roles for now.