Closed kenjis closed 1 year ago
Hi @kenjis I would like to implement this feature. Would it be okay if the issue was assigned to me?
@davidnsai that sounds great! I've assigned it to you. I look forward to seeing it, thanks.
@davidnsai Yes, no problem! Please do it.
So I've been looking at the best implementation for this feature I had a number of thought around it
That sounds great.
Action seems to be a little different because it is an additional action required at the time of authentication. It also requires a User Identity record.
User table has status
and it can be used.
At least Myth:Auth has the implementation like that.
See https://github.com/lonnieezell/myth-auth/blob/1c646c58e8b9b956b2163ebda8e5ec7e9ed609ce/src/Entities/User.php#L196-L202
Yes, the status
field on the user table is what was originally intended to store that (and potentially other statuses, depending on the app needs). status_message
was intended to allow a reason to be recorded at the time of the status change that could be relayed to the user, like "You're account has been banned for too many hacking attempts" or whatever.
Off the top of my head, I think adding it to the filter is probably all that's needed. Seems like that would let us more easily redirect with a custom message.
Implement a feature to ban users.
See