lib/conjur/acts_as_resource.rb in conjur-api-4.1.1 vs lib/conjur/acts_as_resource.rb in conjur-api-4.3.0
- old
+ new
@@ -24,10 +24,14 @@
require 'conjur/resource'
# NOTE: should we use specific class to build sub-url below?
Conjur::Resource.new(Conjur::Authz::API.host, self.options)[[ core_conjur_account, 'resources', path_escape(resource_kind), path_escape(resource_id) ].join('/')]
end
+ def resourceid
+ [ core_conjur_account, resource_kind, resource_id ].join(':')
+ end
+
def resource_kind
require 'active_support/core_ext'
self.class.name.split("::")[-1].underscore.split('/').join('-')
end
@@ -36,8 +40,16 @@
end
def delete
resource.delete
super
+ end
+
+ def permit(privilege, role, options = {})
+ resource.permit privilege, role, options
+ end
+
+ def deny(privilege, role)
+ resource.deny privilege, role
end
end
end
\ No newline at end of file