lib/eucalypt/security/namespaces/security-policy/templates/policy.tt in eucalypt-0.5.0 vs lib/eucalypt/security/namespaces/security-policy/templates/policy.tt in eucalypt-0.5.1
- old
+ new
@@ -3,14 +3,6 @@
def initialize(user, <%= config[:resource] %>)
@user = user
@<%= config[:resource] %> = <%= config[:resource] %>
end
-
- if ActiveRecord::Base.connection.table_exists?(:<%= config[:resource] %>_roles)
- <%= config[:constant] %>Role.pluck(:permission).each do |permission|
- define_method("#{permission}?") do
- <%= config[:constant] %>Role.find_by(permission: permission).send(user.role.<%= config[:resource] %>)
- end
- end
- end
end
\ No newline at end of file