Foysal Ahamed 3ad0519961
Ozone team member manager (#2460)
* 🚧 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
2024-06-18 18:47:20 -04:00

38 lines
1.1 KiB
JSON

{
"lexicon": 1,
"id": "tools.ozone.team.defs",
"defs": {
"member": {
"type": "object",
"required": ["did", "role"],
"properties": {
"did": { "type": "string", "format": "did" },
"disabled": { "type": "boolean" },
"profile": {
"type": "ref",
"ref": "app.bsky.actor.defs#profileViewDetailed"
},
"createdAt": { "type": "string", "format": "datetime" },
"updatedAt": { "type": "string", "format": "datetime" },
"lastUpdatedBy": { "type": "string" },
"role": {
"type": "string",
"knownValues": ["#roleAdmin", "#roleModerator", "#roleTriage"]
}
}
},
"roleAdmin": {
"type": "token",
"description": "Admin role. Highest level of access, can perform all actions."
},
"roleModerator": {
"type": "token",
"description": "Moderator role. Can perform most actions."
},
"roleTriage": {
"type": "token",
"description": "Triage role. Mostly intended for monitoring and escalating issues."
}
}
}