foreman_users 0.0.24 → 0.0.25
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
|
|
1
|
-
class ForemanUsers::
|
1
|
+
class ForemanUsers::Sygroup < ActiveRecord::Base
|
2
2
|
attr_accessible :groupname, :ensure, :gid, :groupable_type, :groupable_id, :user_id
|
3
|
-
belongs_to :
|
3
|
+
belongs_to :foreman_users_syuser, class_name: "ForemanUsers::Syuser",foreign_key: "user_id"
|
4
4
|
end
|
@@ -3,7 +3,7 @@ class ForemanUsers::Syuser < ActiveRecord::Base
|
|
3
3
|
attr_accessible :title, :body, :name, :ensure , :gid, :groups, :home , :password, :password_max_age, :password_min_age, :shell, :uid, :sygroups_attributes
|
4
4
|
|
5
5
|
|
6
|
-
has_many :sygroups
|
6
|
+
has_many :sygroups, class_name: "ForemanUsers::Sygroup", foreign_key: "user_id"
|
7
7
|
accepts_nested_attributes_for :sygroups, reject_if: proc { |attributes| attributes['gid'].blank?| attributes['name'].blank? | attributes['ensure'].blank? } , allow_destroy: true
|
8
8
|
|
9
9
|
after_create :create_dir
|