foreman_users 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,11 @@
|
|
1
|
+
require "fileutils"
|
1
2
|
module ForemanUsers
|
2
3
|
class User < ActiveRecord::Base
|
3
|
-
require "fileutils"
|
4
|
-
attr_accessible :title, :body, :username, :ensure , :gid, :groups, :home , :password, :password_max_age, :password_min_age, :shell, :uid, :groups_attributes
|
5
4
|
|
5
|
+
attr_accessible :title, :body, :username, :ensure , :gid, :groups, :home , :password, :password_max_age, :password_min_age, :shell, :uid, :groups_attributes
|
6
6
|
|
7
|
-
|
7
|
+
|
8
|
+
has_many :groups, :class_name => 'ForemanUsers::User::ForemanTasks::Group', :foreign_key => :user_id
|
8
9
|
accepts_nested_attributes_for :groups, reject_if: proc { |attributes| attributes['gid'].blank?| attributes['name'].blank? | attributes['ensure'].blank? } , allow_destroy: true
|
9
10
|
|
10
11
|
after_create :create_dir
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<table class="table table-bordered table-striped table-condensed" >
|
4
4
|
<thead>
|
5
5
|
<tr>
|
6
|
-
<th class=
|
6
|
+
<th class="hidden-tablet hidden-xs">name</th>
|
7
7
|
<th class="hidden-xs">ensure</th>
|
8
8
|
<th class="hidden-xs">gid</th>
|
9
9
|
<th class="hidden-tablet hidden-xs">groups</th>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<tbody>
|
20
20
|
<% users.each do |user| %>
|
21
21
|
<tr>
|
22
|
-
<td class=
|
22
|
+
<td class="hidden-tablet hidden-xs"><%= user.username %></td>
|
23
23
|
<td class="hidden-xs"><%= user.ensure %></td>
|
24
24
|
<td class="hidden-xs"><%= user.gid %></td>
|
25
25
|
<td class="hidden-tablet hidden-xs"><%= user.groups %></td>
|