Sha256: 959a6550594fce556156945ba076d8aaa685950c806781bd2f673024e0baf0a0
Contents?: true
Size: 1.73 KB
Versions: 24
Compression:
Stored size: 1.73 KB
Contents
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
Version data entries
24 entries across 24 versions & 1 rubygems