Repository navigation
feat: add PUT /api/v2/users/:user-id/suspend endpoint - #1154
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1154 +/- ##
==========================================
- Coverage 66.34% 66.23% -0.11%
==========================================
Files 263 263
Lines 16615 16662 +47
Branches 156 156
==========================================
+ Hits 11023 11036 +13
- Misses 4452 4477 +25
- Partials 1140 1149 +9
Continue to review full report at Codecov.
|
|
Also related to #598 |
There was a problem hiding this comment.
The change looks good to me (excepting the failed unit tests), but I'm confused as to why we're now creating a user_status column instead of a suspended column as was originally discussed here.
What kind of user statuses do we plan to have besides "active" and "suspended"?
If these are the only we currently have planned, would it be simpler to have a boolean column suspended with a default value of false?
| Offset int `json:"offset"` | ||
| } | ||
|
|
||
| type UserStatus string |
There was a problem hiding this comment.
Instead of UserStatus I'd be more in favor of @johnstcn's suggestion to use suspended as a boolean. Because we only have two statuses for now, it feels weird to make it generic.
There was a problem hiding this comment.
There is this conversation here https://codercom.slack.com/archives/C014JH42DBJ/p1650895472652489?thread_ts=1650895472.652489&cid=C014JH42DBJ but I'm good using both.
There was a problem hiding this comment.
There is this conversation here https://codercom.slack.com/archives/C014JH42DBJ/p1650895472652489?thread_ts=1650895472.652489&cid=C014JH42DBJ but I'm good using both.
Ah, I missed parts of that thread. I'm fine either way honestly.
There was a problem hiding this comment.
@kylecarbs @johnstcn I think we will have more statuses like dormant
There was a problem hiding this comment.
Could a user be dormant and suspended?
There was a problem hiding this comment.
@kylecarbs I believe the user would just be suspended.
-- Just my take --
Only active users count towards the licensed seats. A dormant user is "inactive" based on activity. A dormant user can reactive themselves by just being active again. (Maybe they have to do some more steps, idk).
A suspended user cannot even log in. Their account must be reactivated by an admin. The user has 0 input on this.
Related to #662