Feature #22434
Block user via API
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | REST API | |||
Target version: | - | |||
Resolution: | Invalid |
Description
According to Rest_Users there is no way to change user state to blocked.
This is very useful feature for script that automate person discharge.
I have script that do suitable magic with LDAP, but for redmine I can only delete user, not block, so every time I have to block user account in redmine by hands.
History
#1
Updated by Holger Just almost 7 years ago
You can set the status of the user using a PUT request. There, you can set the status as follows (here using json):
{
"user": {
"status": 3
}
}
The status values are as follows:
- STATUS_ACTIVE = 1 (User can login and use their account)
- STATUS_REGISTERED = 2 (User has registered but not yet confirmed their email address or was not yet activated by an administrator. User can not login)
- STATUS_LOCKED = 3 (User was once active and is now locked, User can not login)
#2
Updated by Toshi MARUYAMA almost 7 years ago
- Description updated (diff)
#3
Updated by Go MAEDA over 2 years ago
- Status changed from New to Closed
- Resolution set to Invalid