fix group autocomplete
This commit is contained in:
parent
8562b882da
commit
cb7a9fcc21
|
@ -31,7 +31,7 @@ class Ability
|
|||
|
||||
can [:show, :update], Settings::Notifier, :user_id => user.id
|
||||
|
||||
can [:read, :create], Group
|
||||
can [:read, :create, :autocomplete_group_uname], Group
|
||||
can [:update, :manage_members], Group do |group|
|
||||
group.objects.exists?(:object_type => 'User', :object_id => user.id, :role => 'admin') # or group.owner_id = user.id
|
||||
end
|
||||
|
|
|
@ -22,7 +22,6 @@ class Group < ActiveRecord::Base
|
|||
delegate :ssh_key, :to => :owner
|
||||
|
||||
after_create :add_owner_to_members
|
||||
after_initialize lambda {|r| r.name ||= r.uname } # default
|
||||
|
||||
include Modules::Models::PersonalRepository
|
||||
# include Modules::Models::Owner
|
||||
|
|
Loading…
Reference in New Issue