Added method to determine current acter (group or user)
This commit is contained in:
parent
fa3359b025
commit
ff5aa09c30
|
@ -11,6 +11,12 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
end
|
||||
|
||||
def get_acter
|
||||
return User.find params[:user_id] if params[:user_id]
|
||||
return Group.find params[:group_id] if params[:group_id]
|
||||
return current_user
|
||||
end
|
||||
|
||||
def authenticate_build_service!
|
||||
if request.remote_ip != APP_CONFIG['build_service_ip']
|
||||
render :nothing => true, :status => 403
|
||||
|
|
Loading…
Reference in New Issue