This file is indexed.

/usr/share/chef-server-webui/app/views/roles/_form.html.erb is in chef-server-webui 10.12.0+dfsg-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<div class="content roleFormContainer">
  <%= form(:action => form_url, :method => method, :id => form_id, :class => 'form roleForm') do -%>
    <% unless form_for == 'edit' %>
      <div class="group form">
        <label class="label" for="role_name">Name</label>
        <%= text_field :id => "role_name", :name => "name", :class => "text_field", :value => params.has_key?(:name) ? h(params[:name]) : @role.name %>
        <span class="description">The name of the Role</span>
      </div>
    <% end %>

    <div class="group form">
      <label class="label" for="role_description">Description</label>
      <%= text_area(params.has_key?(:description) ? h(params[:description]) : @role.description, :name => "description", :class => "text_area", :id => "role_description") %>
      <span class="description">A description of this Role</span>
    </div>

    <div class="group form" id="run_list_editor_container">
      <div id="availableRunListItemContainer" class="runListEditorColumn">
        <div id="available_roles_container" class="runListItemListContainer">
          <div class="runListEditorLabel">Available Roles</div>
          <div class="sortable runListAvailableItemContainer">
            <ul id="availableRoles" class="connectedSortable runListAvailableItemList" data-role-list='<%= @available_roles.to_json -%>'>
              <% @available_roles.each do |role| %>
                <li id="role[<%=h(role)  -%>]" class="ui-state-highlight runListItem"><%= h(role) -%></li>
              <% end %>
            </ul>
          </div>
        </div>
        <div id="available_recipes_container" class="runListItemListContainer">
          <div class="runListEditorLabel">Available Recipes</div>
          <div class="sortable runListAvailableItemContainer">
            <div class="spinner">
              <%= image_tag('indicator.gif') -%>
            </div>
            <ul id="role" class="connectedSortable runListAvailableItemList availableRecipes">
            </ul>
          </div>
        </div>
      </div>
      <div id="run_list_container" class="runListEditorColumn">
        <div class="runListItemListContainer">
          <div id="environmentRunListSelector" data-initial-env="<%=h @current_env -%>">
            <div class="runListEditorLabel">
              <span id="selectedRunListEditorLabel">
                <% if @current_env == '_default' -%>
                  Default Run List
                <% else -%>
                  Run List for <%= @current_env -%>
                <% end -%>
              </span>
              <span id="environment_run_list_selection_control">
                <%= select :environment, :collection => [['noop','Other Environments']].concat(@environments.map {|e| [e,e]}), :id => 'activeEnvironment'%>
              </span>
            </div>
          </div>
          <% @run_lists.each do |environment, run_list| %>
            <%= partial('run_lists', :environment => environment, :run_list => run_list)%>
          <% end %>
        </div>
      </div>
      <div id="current_run_list_display_container" class="runListEditorColumn">
        <div class="runListItemListContainer">
          <div class="runListEditorLabel activeRunListLabel">Active Run List for <%= h(@current_env) -%></div>
          <div class="sortable activeRunListContainer">
            <% if @current_env != "_default"  && @role.env_run_lists[@current_env].nil? %>
              <div id="activeRunListName">using <%= @role.active_run_list_for(@current_env).gsub('_default', 'default') -%> run list</div>
            <% end %>
            <ul class="runListItemList" id="active_run_list">
              <% @role.run_list_for(@current_env).each do |item| %>
                <li class="displayRunListItem"><%= h(item) -%></li>
              <% end %>
            </ul>
          </div>
        </div>
      </div>
    </div>

    <div class="group form attrEditor">
      <label class="label">Default and Override Attributes</label>
      <%= partial 'layout/jsonedit', :json => { :defaults => @role.default_attributes, :overrides => @role.override_attributes }.to_json%>
      <span class="description">
        A JSON hash for default attributes for nodes of this role. These attributes will be applied according to the attribute precedence rules.
      </span>
    </div>

    <div class="group">
      <div class="actions-bar">
        <%= submit(submit_name, :id => submit_id, :class => 'button') -%>
      </div>
    </div>
  <% end =%>
</div>