diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-05-28 16:14:58 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-05-28 16:14:58 +0300 |
commit | 05a44dcb8b70663e376acfb2b5874bae454bfecf (patch) | |
tree | 94cb2028e082ce4a9baa3cc846ef7171f129c790 /lib | |
parent | 06250eef2e12ed509b88f3770ae6d3fa4614b74d (diff) | |
parent | 2db026793df81f97515a13e1b4355436f6cc76c3 (diff) |
Merge branch 'user-destroy-wo-groups' into 'master'
You can not remove user if he/she is an only owner of group
To prevent loose of group data you need to transfer or remove group
first before you can remove user
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
See merge request !730
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/users.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index 032a5d76e43..7d4c68c7412 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -194,7 +194,7 @@ module API user = User.find_by(id: params[:id]) if user - user.destroy + DeleteUserService.new.execute(user) else not_found!('User') end |