Skip to content

Commit

Permalink
require_admin_or_adviser_loginメソッドをprotectedに変更
Browse files Browse the repository at this point in the history
  • Loading branch information
su-su-su-su committed Oct 3, 2024
1 parent fce75dd commit e5779c8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def require_staff_login
redirect_to root_path, alert: '管理者・アドバイザー・メンターとしてログインしてください'
end

protected

def require_admin_or_adviser_login
return if admin_login? || (adviser_login? && current_user.company == @company)

Expand Down

0 comments on commit e5779c8

Please sign in to comment.