diff --git a/app/controllers/v1/users_controller.rb b/app/controllers/v1/users_controller.rb index e8e2408bb9b3fe9a0eb4fd6978cdf882c786f979..881d2d6c9688830ebd19a5eeca7ae2718b6c57b4 100644 --- a/app/controllers/v1/users_controller.rb +++ b/app/controllers/v1/users_controller.rb @@ -46,11 +46,11 @@ class V1::UsersController < ApplicationController # DELETE /v1/users/1 # DELETE /v1/users/1.json def destroy - if current_user == @user - render status: :forbidden - else + if current_user.is_admin? @user.destroy render status: :ok + else + render status: :forbidden end end