Conditions | 1 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | # frozen_string_literal: true |
||
23 | def resource(resource_factory, owner, privilege) |
||
24 | resource_factory.sudo "user:#{owner.id}" do |
||
25 | privilege.options.each do |key, value| |
||
26 | if self.class.properties.keys.include?(key) |
||
27 | send(key, value) |
||
28 | else |
||
29 | ::Chef::Log.warn( |
||
30 | "Account #{owner.id} sudo privilege " \ |
||
31 | "has unknown option #{key}" |
||
32 | ) |
||
33 | end |
||
34 | end |
||
35 | user owner.id.to_s |
||
36 | end |
||
37 | end |
||
38 | |||
50 |