Revision a77acc4a
Added by Thomas McKay about 9 years ago
lib/hammer_cli_csv/permissions.rb | ||
---|---|---|
22 | 22 |
# Role |
23 | 23 |
# Description |
24 | 24 |
# Category |
25 |
# - organizations, environments, activation_keys, system_groups, providers, users, roles,
|
|
25 |
# - organizations, environments, activation_keys, host_collections, providers, users, roles,
|
|
26 | 26 |
# content_view_definitions, content_views, all |
27 | 27 |
# Verbs |
28 | 28 |
# organizations - gpg, redhat_products, delete_distributors, delete_systems, manage_nodes, |
... | ... | |
32 | 32 |
# promote_changesets, read_changesets, read_distributors, read_contents, read_systems, |
33 | 33 |
# register_distributors, register_systems, delete_distributors, delete_systems |
34 | 34 |
# activation_keys - manage_all, read_all |
35 |
# system_groups - create, delete, delete_systems, update, update_systems, read, read_systems
|
|
35 |
# host_collections - create, delete, delete_systems, update, update_systems, read, read_systems
|
|
36 | 36 |
# providers - create, delete, update, read |
37 | 37 |
# users - create, delete, update, read |
38 | 38 |
# roles - create, delete, update, read |
... | ... | |
107 | 107 |
details = parse_permission_csv(line) |
108 | 108 |
|
109 | 109 |
puts @permission_api.index({'role_id' => @roles['User System Group']}) |
110 |
# {"all_tags"=>false, "all_verbs"=>false, "created_at"=>"2013-11-11T02:31:23Z", "description"=>"and it's description!", "id"=>12, "name"=>"Accounting System Group Modify Systems", "organization_id"=>2, "resource_type_id"=>5, "role_id"=>124, "updated_at"=>"2013-11-11T02:31:23Z", "tags"=>[{"created_at"=>"2013-11-11T02:31:23Z", "formatted"=>{"name"=>6, "display_name"=>"Accounting"}, "id"=>2, "permission_id"=>12, "tag_id"=>6, "updated_at"=>"2013-11-11T02:31:23Z"}], "verbs"=>[{"created_at"=>"2013-11-07T19:44:45Z", "id"=>7, "updated_at"=>"2013-11-07T19:44:45Z", "verb"=>"update_systems"}], "resource_type"=>{"created_at"=>"2013-11-07T16:36:56Z", "id"=>5, "name"=>"system_groups", "updated_at"=>"2013-11-07T16:36:56Z"}}
|
|
110 |
# {"all_tags"=>false, "all_verbs"=>false, "created_at"=>"2013-11-11T02:31:23Z", "description"=>"and it's description!", "id"=>12, "name"=>"Accounting System Group Modify Systems", "organization_id"=>2, "resource_type_id"=>5, "role_id"=>124, "updated_at"=>"2013-11-11T02:31:23Z", "tags"=>[{"created_at"=>"2013-11-11T02:31:23Z", "formatted"=>{"name"=>6, "display_name"=>"Accounting"}, "id"=>2, "permission_id"=>12, "tag_id"=>6, "updated_at"=>"2013-11-11T02:31:23Z"}], "verbs"=>[{"created_at"=>"2013-11-07T19:44:45Z", "id"=>7, "updated_at"=>"2013-11-07T19:44:45Z", "verb"=>"update_systems"}], "resource_type"=>{"created_at"=>"2013-11-07T16:36:56Z", "id"=>5, "name"=>"host_collections", "updated_at"=>"2013-11-07T16:36:56Z"}}
|
|
111 | 111 |
|
112 | 112 |
@existing[@roles[details[:role]]] ||= {} |
113 | 113 |
@permission_api.index({'role_id' => @roles[details[:role]]}).each do |permission| |
Also available in: Unified diff
a lot of fixes and updates across many resources to match katello updates