Sha256: bc07186dee7db157a9ba0240cf38d14b15135a16471e0e030c85b31b03188330

Contents?: true

Size: 674 Bytes

Versions: 23

Compression:

Stored size: 674 Bytes

Contents

<% if policy(f.object).policies? %>
  <h2>
    Access control
  </h2>
  <p>
    <% if f.object.kind_of?(User) && f.object != current_user %>
      <%= f.check_box :activated %> The user account is activated<br />
    <% end %>
    <% Role.roles.each do |role| %>
      <%= check_box_tag("#{model_name_from_record_or_class(f.object).param_key}[role_names][]",
                        role.name,
                        f.object.role?(role.name.to_sym),
                        id: "role-#{role.name}",
                        class: "role") %>
      <label for="role-<%= role.name %>">
        <%= role.description %>
      </label>
      <br>
    <% end %>
  </p>
<% end %>

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
pages_core-3.14.0 app/views/admin/users/_access_control.html.erb
pages_core-3.13.0 app/views/admin/users/_access_control.html.erb
pages_core-3.12.7 app/views/admin/users/_access_control.html.erb
pages_core-3.12.6 app/views/admin/users/_access_control.html.erb
pages_core-3.12.5 app/views/admin/users/_access_control.html.erb
pages_core-3.12.4 app/views/admin/users/_access_control.html.erb
pages_core-3.12.3 app/views/admin/users/_access_control.html.erb
pages_core-3.12.2 app/views/admin/users/_access_control.html.erb
pages_core-3.12.1 app/views/admin/users/_access_control.html.erb
pages_core-3.12.0 app/views/admin/users/_access_control.html.erb
pages_core-3.11.3 app/views/admin/users/_access_control.html.erb
pages_core-3.11.2 app/views/admin/users/_access_control.html.erb
pages_core-3.11.1 app/views/admin/users/_access_control.html.erb
pages_core-3.11.0 app/views/admin/users/_access_control.html.erb
pages_core-3.10.2 app/views/admin/users/_access_control.html.erb
pages_core-3.10.1 app/views/admin/users/_access_control.html.erb
pages_core-3.9.2 app/views/admin/users/_access_control.html.erb
pages_core-3.9.1 app/views/admin/users/_access_control.html.erb
pages_core-3.9.0 app/views/admin/users/_access_control.html.erb
pages_core-3.8.3 app/views/admin/users/_access_control.html.erb