Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3568f2f8

Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt

  • ID 3568f2f8cb1f21031ee5255f054c0431544c5607
  • Vorgänger 672e9658
  • Nachfolger 3e29b95e

RDBO: Setups der Auth*-Instanzen vereinheitlicht

Unterschiede anzeigen:

SL/DB/AuthUser.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4 1
package SL::DB::AuthUser;
5 2

  
6 3
use strict;
......
9 6

  
10 7
use SL::DB::MetaSetup::AuthUser;
11 8
use SL::DB::Manager::AuthUser;
9
use SL::DB::AuthClient;
12 10
use SL::DB::AuthUserGroup;
13

  
14
__PACKAGE__->meta->schema('auth');
11
use SL::DB::Helper::Util;
15 12

  
16 13
__PACKAGE__->meta->add_relationship(
17 14
  groups => {
......
27 24
  },
28 25
  clients => {
29 26
    type      => 'many to many',
30
    map_class => 'SL::DB::AuthClient',
27
    map_class => 'SL::DB::AuthUserClient',
31 28
    map_from  => 'user',
32 29
    map_to    => 'client',
33 30
  },
......
35 32

  
36 33
__PACKAGE__->meta->initialize;
37 34

  
35
sub validate {
36
  my ($self) = @_;
37

  
38
  my @errors;
39
  push @errors, $::locale->text('The login is missing.')          if !$self->login;
40
  push @errors, $::locale->text('The login is not unique.')          if !SL::DB::Helper::Util::is_unique($self, 'login');
41
  push @errors, "chunky bacon";
42

  
43
  return @errors;
44
}
45

  
38 46
sub get_config_value {
39 47
  my ($self, $key) = @_;
40 48

  

Auch abrufbar als: Unified diff