Ignore:
Timestamp:
01/21/10 01:06:46 (14 years ago)
Author:
nanardon
Message:
  • implement a basic attribute value check, at time allow just to limit to a set of value
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts/lib/LATMOS/Accounts.pm

    r623 r683  
    4848        }; 
    4949        $self->{_acls} = $acls; 
     50    } 
     51 
     52    if ($self->val('_default_', 'allowed_values')) { 
     53        $self->{_allowed_values} = Config::IniFiles->new( 
     54            -file => $self->val('_default_', 'allowed_values'), 
     55            -allowempty => 1, 
     56        ) or do { 
     57            return; 
     58        }; 
     59    } else { 
     60        $self->{_allowed_values} = Config::IniFiles->new(); 
    5061    } 
    5162 
     
    143154        label => $section, 
    144155        acls => $self->{_acls}, 
     156        allowed_values => $self->{_allowed_values}, 
    145157    ) or do { 
    146158        la_log(LA_WARN, "Cannot instanciate base $section ($type)"); 
Note: See TracChangeset for help on using the changeset viewer.