lib/conjur/command/resources.rb in conjur-cli-2.4.0 vs lib/conjur/command/resources.rb in conjur-cli-2.4.1
- old
+ new
@@ -12,9 +12,14 @@
c.action do |global_options,options,args|
kind = require_arg(args, "kind")
id = require_arg(args, "resource-id")
resource = api.resource([ conjur_account, kind, id ].join(':'))
+
+ if ownerid = options.delete(:ownerid)
+ options[:acting_as] = ownerid
+ end
+
resource.create(options)
display resource.attributes
end
end