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/v2/smart_proxies_controller.rb
private
def proxies_by_type(type = nil)
return SmartProxy.includes(:features).try(type.downcase+"_proxies") if type.present?
return SmartProxy.includes(:features).scoped
return SmartProxy.authorized(:view_smart_proxies).includes(:features).try(type.downcase+"_proxies") if type.present?
return SmartProxy.authorized(:view_smart_proxies).includes(:features).scoped
end
def action_permission
case params[:action]
when 'refresh'
:edit
else
super
end
end
def check_feature_type

Also available in: Unified diff