Project

General

Profile

Actions

Feature #22434

closed

Block user via API

Added by Evgeniy Dushistov over 8 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
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.

Actions #1

Updated by Holger Just over 8 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)
Actions #2

Updated by Toshi MARUYAMA over 8 years ago

  • Description updated (diff)
Actions #3

Updated by Go MAEDA over 4 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid
Actions

Also available in: Atom PDF