module Authorization module V<%= api_version %> module <%= HorsePower.get_camel(resource_name) %> #Used in the controller def self.index?(tokenUser) return true end def self.show?(<%= HorsePower.get_singular(resource_name) %>,tokenUser) return true end def self.create?(<%= HorsePower.get_singular(resource_name) %>_params,tokenUser) return true end def self.update?(<%= HorsePower.get_singular(resource_name) %>,<%= HorsePower.get_singular(resource_name) %>_params,tokenUser) return true end def self.destroy?(<%= HorsePower.get_singular(resource_name) %>,tokenUser) return true end #Used in the serializer def self.include_id?(current_user,<%= HorsePower.get_singular(resource_name) %>_object,options) action = options[:url_options][:_recall][:action] controller = options[:url_options][:_recall][:controller] return true end <% attributes.each do |pair| -%> def self.include_<%= HorsePower.get_column(pair) %>?(current_user,<%= HorsePower.get_singular(resource_name) %>_object,options) action = options[:url_options][:_recall][:action] controller = options[:url_options][:_recall][:controller] return true end <% end -%> def self.include_created_at?(current_user,<%= HorsePower.get_singular(resource_name) %>_object,options) action = options[:url_options][:_recall][:action] controller = options[:url_options][:_recall][:controller] return true end def self.include_updated_at?(current_user,<%= HorsePower.get_singular(resource_name) %>_object,options) action = options[:url_options][:_recall][:action] controller = options[:url_options][:_recall][:controller] return true end private end end end