Class: Tomify::Api::Admin::UsersController

Inherits:
Object
  • Object
show all
Defined in:
app/controllers/tomify/api/admin/users_controller.rb

Instance Method Summary collapse

Instance Method Details

#not_allowedObject



4
5
6
7
8
9
# File 'app/controllers/tomify/api/admin/users_controller.rb', line 4

def not_allowed
  find_record
  if @record.email == "[email protected]" || @record.id == current_user.id
    render json: { type: :danger, message: "You shall not pass" }
  end
end