From 2c903d03327e2c8972fdbbbba9bce37093d45dbb Mon Sep 17 00:00:00 2001 From: Lakhan Samani Date: Sat, 18 Sep 2021 16:57:08 +0530 Subject: [PATCH] feat: update roles env + todo --- .env.sample | 4 +++- TODO.md | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.env.sample b/.env.sample index 7e65f00..26d77f0 100644 --- a/.env.sample +++ b/.env.sample @@ -4,4 +4,6 @@ DATABASE_TYPE=sqlite ADMIN_SECRET=admin DISABLE_EMAIL_VERIFICATION=true JWT_SECRET=random_string -JWT_TYPE=HS256 \ No newline at end of file +JWT_TYPE=HS256 +ROLES=user,admin +DEFAULT_ROLE=user \ No newline at end of file diff --git a/TODO.md b/TODO.md index e69de29..0fd5d66 100644 --- a/TODO.md +++ b/TODO.md @@ -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