WIP! A BB-style forum, on the ATmosphere! We're still working... we'll be back soon when we have something to show off!
node typescript hono htmx atproto
at main 56 lines 1.2 kB view raw
1meta { 2 name: Assign Role 3 type: http 4 seq: 1 5} 6 7post { 8 url: {{appview_url}}/api/admin/members/:did/role 9} 10 11params:path { 12 did: {{target_user_did}} 13} 14 15body:json { 16 { 17 "roleUri": "at://{{forum_did}}/space.atbb.forum.role/{{role_rkey}}" 18 } 19} 20 21assert { 22 res.status: eq 200 23 res.body.success: isDefined 24 res.body.roleAssigned: isDefined 25} 26 27docs { 28 Assign a role to a forum member. 29 30 **Requires:** `space.atbb.permission.manageRoles` permission 31 32 Path params: 33 - did: Target user's DID (required) 34 35 Body params: 36 - roleUri: Full AT URI of the role to assign (required, format: at://FORUM_DID/space.atbb.forum.role/RKEY) 37 38 Returns: 39 { 40 "success": true, 41 "roleAssigned": "Moderator", 42 "targetDid": "did:plc:user123" 43 } 44 45 Error codes: 46 - 400: Invalid roleUri format 47 - 401: Not authenticated 48 - 403: Insufficient permissions or priority hierarchy violation 49 - 404: Role or user membership not found 50 - 500: Forum agent not available or forum record missing 51 - 503: Unable to reach user's PDS 52 53 Priority hierarchy: 54 - Cannot assign role with equal or higher authority than your own 55 - Lower priority value = higher authority (Owner=0, Admin=10, Moderator=20, Member=30) 56}