3ad0519961
* 🚧 Proposal for moderator manager lexicons * ✨ CRUD for moderator management works * ✨ Add profile view to moderator user list * ✨ Seed mod users from env var to db * ✅ Adjust tests * ✅ Update snapshots * ✨ Fix type and lexicon token issues * ✨ Add pagination to listUsers * ✨ Use sort order in pagination * 📝 Change error name * ✅ Update snapshots * ✅ seed mods in sync to avoid re-order * 🧹 Remove unnecessary import * 🐛 Re-run codegen * 🧹 Some cleanup * 🧹 Cleanup unnecessary properties on auth-verifier * ✨ Rename terminologies from moderator to team and member * 🧹 Cleanup * ✨ Allow admin tokens to update/add member * ✨ Delete members in transaction * ✨ Use db transactions and move profile hydration to the service layer * ✅ Add test for addMember endpoint * 🐛 wait on adding admin DID * ✨ Do not allow updating/deleting service owner and always give service owner admin access * 🧹 Cleanup * ✨ Make timestamp columns non null * 🧹 Cleanup * ✨ Update mod role definition in getConfig * ✨ Deletion and update guards * 🐛 don't prefill service did * 📝 Add changeset
43 lines
1.1 KiB
JSON
43 lines
1.1 KiB
JSON
{
|
|
"lexicon": 1,
|
|
"id": "tools.ozone.team.updateMember",
|
|
"defs": {
|
|
"main": {
|
|
"type": "procedure",
|
|
"description": "Update a member in the ozone service. Requires admin role.",
|
|
"input": {
|
|
"encoding": "application/json",
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["did"],
|
|
"properties": {
|
|
"did": { "type": "string", "format": "did" },
|
|
"disabled": { "type": "boolean" },
|
|
"role": {
|
|
"type": "string",
|
|
"knownValues": [
|
|
"tools.ozone.team.defs#roleAdmin",
|
|
"tools.ozone.team.defs#roleModerator",
|
|
"tools.ozone.team.defs#roleTriage"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"output": {
|
|
"encoding": "application/json",
|
|
"schema": {
|
|
"type": "ref",
|
|
"ref": "tools.ozone.team.defs#member"
|
|
}
|
|
},
|
|
"errors": [
|
|
{
|
|
"name": "MemberNotFound",
|
|
"description": "The member being updated does not exist in the team"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|