This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
class WorkInfoController < ApplicationController
|
||||
def index
|
||||
@user = User.find_by(id: params[:user_id])
|
||||
if !(@user) || @user.admin
|
||||
flash[:error] = "Sorry, no user with that user id exists"
|
||||
redirect_to home_dashboard_index_path
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user