Project

General

Profile

« Previous | Next » 

Revision acfbc458

Added by Marek Hulán about 10 years ago

fixes #812 - new permissions model, user group role and nest support, role filters for better granularity

Contributions from:

View differences:

app/controllers/api/v1/smart_proxies_controller.rb
end
private
def action_permission
case params[:action]
when 'refresh'
:edit
else
super
end
end
def proxies_by_type(type)
return SmartProxy.includes(:features).try(type.downcase+"_proxies") if not type.nil?
return SmartProxy.includes(:features).all
return SmartProxy.authorized(:view_smart_proxies).includes(:features).try(type.downcase+"_proxies") if not type.nil?
return SmartProxy.authorized(:view_smart_proxies).includes(:features).all
end
def check_feature_type

Also available in: Unified diff