1 package SL::DB::AuthGroup;
5 use SL::DB::MetaSetup::AuthGroup;
6 use SL::DB::Manager::AuthGroup;
7 use SL::DB::AuthGroupRight;
9 __PACKAGE__->meta->add_relationship(
11 type => 'many to many',
12 map_class => 'SL::DB::AuthUserGroup',
17 type => 'one to many',
18 class => 'SL::DB::AuthGroupRight',
19 column_map => { id => 'group_id' },
22 type => 'many to many',
23 map_class => 'SL::DB::AuthClientGroup',
29 __PACKAGE__->meta->initialize;
32 my @logins = map { $_->login } $_[0]->users;
33 return @logins ? @{ SL::DB::Manager::Employee->get_all(query => [ login => \@logins ]) } : ();