Ignore:
Timestamp:
07/08/15 15:06:49 (9 years ago)
Author:
nanardon
Message:

Split authentication function per base fonctionnality

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql.pm

    r1327 r1367  
    176176}  
    177177 
     178sub authenticate_user { 
     179    my ($self, $username, $passwd) = @_; 
     180    $username or return; 
     181    my $uobj = $self->get_object('user', $username) or do { 
     182        la_log(LA_ERR, "Cannot authenticate non existing user $username"); 
     183        return; 
     184    }; 
     185 
     186    if ($self->attribute('user', 'exported')) { 
     187        if (!$uobj->_get_c_field('exported')) { 
     188            la_log(LA_ERR, "User $username found but currently unexported"); 
     189            return; 
     190        } 
     191    } 
     192 
     193    $self->SUPER::authenticate_user($username, $passwd); 
     194} 
     195 
    178196=head1 SPECIFICS FUNCTIONS 
    179197 
Note: See TracChangeset for help on using the changeset viewer.