:location => {:controller => params[:controller], :action => params[:action]}
}
@server_result[:location][:id] = params[:id] if params[:id]
- if Admin.count.to_i == 0 or License.count.to_i == 0
- if params[:controller] == 'system' and params[:action] == 'start'
- else
- redirect_to :controller => '/system', :action => 'start'
- end
+ user = if user_signed_in?
+ current_user
else
- user = if user_signed_in?
- current_user
- else
- nil
- end
- author = if user
- user.author
- else
- nil
- end
- artist = if user
- user.artist
- else
- nil
- end
- admin = if admin_signed_in?
- current_admin
- else
- nil
- end
- demand_user = if demand_user_signed_in?
- current_demand_user
- else
- nil
- end
- @operators = Operator.new [user, author, artist, admin, demand_user]
+ nil
+ end
+ author = if user
+ user.author
+ else
+ nil
+ end
+ artist = if user
+ user.artist
+ else
+ nil
+ end
+ admin = if admin_signed_in?
+ current_admin
+ else
+ nil
+ end
+ demand_user = if demand_user_signed_in?
+ current_demand_user
+ else
+ nil
end
+ @operators = Operator.new [user, author, artist, admin, demand_user]
end
def authenticate_reader