Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/verbasu/rocketchat-roles
RocketChat roles and permissions research
https://github.com/verbasu/rocketchat-roles
api api-rest framework mongo mongodb openapi openapi3 orm rocket rocketchat rocketchat-ui rust utoipa web
Last synced: about 1 month ago
JSON representation
RocketChat roles and permissions research
- Host: GitHub
- URL: https://github.com/verbasu/rocketchat-roles
- Owner: verbasu
- Created: 2024-05-03T17:22:26.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-09-22T06:40:25.000Z (about 2 months ago)
- Last Synced: 2024-09-27T07:21:14.225Z (about 2 months ago)
- Topics: api, api-rest, framework, mongo, mongodb, openapi, openapi3, orm, rocket, rocketchat, rocketchat-ui, rust, utoipa, web
- Language: Rust
- Homepage: https://localhost:8000/
- Size: 249 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Create custom views for RocketChat database collections (Mongo)
We use Rocket :) web framework written in Rust
Now we have OpenAPI for roles (thanks to `juhaku / utoipa`) and web interface using HTMX and Tera templates.
---
```shell
curl http://localhost:8000/users/ | jq
``````json
[
{
"_id": "rocket.cat",
"roles": [
"bot"
],
"status": "online",
"username": "rocket.cat",
"active": true
},
{
"_id": "G7RXKXa3w9pMn3RMt",
"roles": [
"user",
"admin"
],
"status": "offline",
"username": "dpl",
"active": true
}
]
``````shell
curl http://localhost:8000/permissions/ | jq
``````json
[
{
"_id": "access-permissions",
"roles": [
"admin"
]
},
{
"_id": "access-marketplace",
"roles": [
"admin",
"user"
]
},
{
"_id": "access-setting-permissions",
"roles": [
"admin"
]
},
{
"_id": "add-oauth-service",
"roles": [
"admin"
]
},
{
"_id": "add-user-to-joined-room",
"roles": [
"admin",
"owner",
"moderator"
]
},
{
"_id": "add-user-to-any-c-room",
"roles": [
"admin"
]
},
{
"_id": "kick-user-from-any-c-room",
"roles": [
"admin"
]
},
{
"_id": "api-bypass-rate-limit",
"roles": [
"admin",
"bot",
"app"
]
},
{
"_id": "archive-room",
"roles": [
"admin",
"owner"
]
},
{
"_id": "assign-admin-role",
"roles": [
"admin"
]
},
{
"_id": "assign-roles",
"roles": [
"admin"
]
},
{
"_id": "ban-user",
"roles": [
"admin",
"owner",
"moderator"
]
},
...
``````shell
curl http://localhost:8000/roles/ | jq
``````json
[
{
"_id": "admin",
"scope": "Users",
"name": "admin"
},
{
"_id": "moderator",
"scope": "Subscriptions",
"name": "moderator"
},
{
"_id": "leader",
"scope": "Subscriptions",
"name": "leader"
},
{
"_id": "owner",
"scope": "Subscriptions",
"name": "owner"
},
{
"_id": "user",
"scope": "Users",
"name": "user"
},
{
"_id": "bot",
"scope": "Users",
"name": "bot"
},
{
"_id": "app",
"scope": "Users",
"name": "app"
},
{
"_id": "guest",
"scope": "Users",
"name": "guest"
},
{
"_id": "anonymous",
"scope": "Users",
"name": "anonymous"
},
{
"_id": "livechat-agent",
"scope": "Users",
"name": "livechat-agent"
},
{
"_id": "livechat-manager",
"scope": "Users",
"name": "livechat-manager"
},
{
"_id": "livechat-monitor",
"scope": "Users",
"name": "livechat-monitor"
}
]
```