Skip to content

Commit

Permalink
Admin still has super powers
Browse files Browse the repository at this point in the history
  • Loading branch information
relf committed Nov 16, 2022
1 parent d4bd8b5 commit 9f39acc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def user_not_authenticated

def user_not_authorized
flash[:error] = "You are not authorized to perform this action."
redirect_to root_path
redirect_back(fallback_location: root_path)
end

def api_docs_controller?
Expand Down
2 changes: 1 addition & 1 deletion app/policies/optimization_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def update?
end

def destroy?
@user.has_role?(:owner, @record)
show?
end

def select?
Expand Down

0 comments on commit 9f39acc

Please sign in to comment.