Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/controllers/admin/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -313,16 +313,16 @@ def revoke_fraud_reviewer
private

def ensure_authorized_user
# Allow admins and fraud team full access
# Admins and fraud team have full access to all actions
return if current_user&.is_admin? || current_user&.fraud_team_member?

# Ship certifiers can only access recertification blocking actions
if current_user&.ship_certifier?
allowed_actions = %w[show block_recertification unblock_recertification]
redirect_to(root_path, alert: "whomp whomp") unless allowed_actions.include?(action_name)
else
redirect_to root_path, alert: "whomp whomp"
return if allowed_actions.include?(action_name)
end

redirect_to root_path, alert: "whomp whomp"
end

def fetch_hackatime(email)
Expand Down