Skip to content

Commit c29f579

Browse files
committed
Redirect to login screen from users page
1 parent 9397da7 commit c29f579

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/controllers/users_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class UsersController < ApplicationController
99
after_action :remove_x_frame_options_header_when_bare_layout, only: %i[new create show]
1010

1111
def index
12+
raise CanCan::AccessDenied if current_user.guest?
1213
respond_access_denied unless current_user.administrator?
1314
@users = User.search(params[:search])
1415
end

0 commit comments

Comments
 (0)