feat: update roles env + todo

This commit is contained in:
Lakhan Samani
2021-09-18 16:57:08 +05:30
parent a6ce563d46
commit 2c903d0332
2 changed files with 18 additions and 1 deletions

View File

@@ -4,4 +4,6 @@ DATABASE_TYPE=sqlite
ADMIN_SECRET=admin
DISABLE_EMAIL_VERIFICATION=true
JWT_SECRET=random_string
JWT_TYPE=HS256
JWT_TYPE=HS256
ROLES=user,admin
DEFAULT_ROLE=user

15
TODO.md
View File

@@ -0,0 +1,15 @@
# Task List
# Feature roles
For the first version we will only support setting roles master list via env
- [x] Support following ENV
- [x] `ROLES` -> comma separated list of role names
- [x] `DEFAULT_ROLE` -> default role to assign to users
- [x] Add roles input for signup
- [ ] Add roles input for login
- [ ] Return roles to user
- [ ] Return roles in users list for super admin
- [ ] Add roles to the JWT token generation
- [ ] Validate token should also validate the role, if roles to validate again is present in request