New Interface for App Auth and Object Auth
This commit is contained in:
1 parent
cb25cf60a9
commit
20a1a6e30f
23 files changed
+442
-14
No files matched your search
@@ -68,9 +68,23 @@ module ApplicationHelper
|
||||
end
|
||||
end
|
||||
|
||||
def active_sys_call_for_app(controller_name,action_name,app_title,field = :id)
|
||||
unless active_for_action(controller_name,action_name).nil?
|
||||
app = ModuleApp.find params[field]
|
||||
def active_for_ob_auths_object(object_class,field = :object_auth_id)
|
||||
unless active_for_action("object_auths_new_interface","setting").nil?
|
||||
ob_auth = ObjectAuth.find params[field]
|
||||
ob_auth.obj_authable_type == object_class.to_s ? 'active' : nil
|
||||
end
|
||||
end
|
||||
|
||||
def active_for_ob_auth(ob_auth_title,field = :object_auth_id)
|
||||
unless active_for_action("module_apps_new_interface","setting").nil?
|
||||
oa_auth = ObjectAuth.find params[field]
|
||||
oa_auth.title == ob_auth_title ? 'active' : nil
|
||||
end
|
||||
end
|
||||
|
||||
def active_for_app_auth(app_title ='', opt={:controller_name => 'module_apps_new_interface',:action_name=>'setting',:field => :module_app_id})
|
||||
unless active_for_action(opt[:controller_name],opt[:action_name]).nil?
|
||||
app = ModuleApp.find params[opt[:field]]
|
||||
app.title == app_title ? 'active' : nil
|
||||
else
|
||||
nil
|
||||
|
||||
Reference in new issue
Block a user