Object
Main permission validator Returns false on lack of permission or an error,
true if the user has the enough permissions - this includes being superadmin.
Will use an :ubiquo_user from the context hash to do the checks.
# File vendor/plugins/ubiquo_access_control/lib/ubiquo_access_control/access_control.rb, line 180
180: def process(auth, context)
181: return false if context[:ubiquo_user].nil? || context[:ubiquo_user] == :false
182: return true if context[:ubiquo_user].is_superadmin?
183: return true if context[:ubiquo_user].has_permission?(nil) # only admins should get true
184: [auth].flatten.each do |a|
185: permit = context[:ubiquo_user].has_permission?(a[:permission])
186: return true if permit==true
187: end
188: false
189: end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.