Cleaning code (#1783 & #1658)

This commit is contained in:
Christophe Maudoux 2019-06-25 23:04:27 +02:00
parent f5587ac477
commit f11c34e9cd
3 changed files with 6 additions and 12 deletions

View File

@ -467,12 +467,14 @@ sub attributes {
type => 'boolOrExpr', type => 'boolOrExpr',
default => 0, default => 0,
documentation => 'Impersonation activation rule', documentation => 'Impersonation activation rule',
flags => 'p',
}, },
impersonationIdRule => { impersonationIdRule => {
type => 'text', type => 'text',
test => sub { return perlExpr(@_) }, test => sub { return perlExpr(@_) },
default => 1, default => 1,
documentation => 'Impersonation identities rule', documentation => 'Impersonation identities rule',
flags => 'p',
}, },
impersonationHiddenAttributes => { impersonationHiddenAttributes => {
type => 'text', type => 'text',
@ -490,24 +492,21 @@ sub attributes {
type => 'boolOrExpr', type => 'boolOrExpr',
default => 0, default => 0,
documentation => 'Context switching activation rule', documentation => 'Context switching activation rule',
flags => 'p',
}, },
contextSwitchingIdRule => { contextSwitchingIdRule => {
type => 'text', type => 'text',
test => sub { return perlExpr(@_) }, test => sub { return perlExpr(@_) },
default => 1, default => 1,
documentation => 'Context switching identities rule', documentation => 'Context switching identities rule',
flags => 'p',
}, },
contextSwitchingStopWithLogout => { contextSwitchingStopWithLogout => {
type => 'bool', type => 'bool',
default => 1, default => 1,
documentation => 'Stop context switching by logout', documentation => 'Stop context switching by logout',
flags => 'p',
}, },
# contextSwitchingHiddenAttributes => {
# type => 'text',
# default => '',
# documentation => 'Attributes to skip',
# flags => 'p',
# },
skipRenewConfirmation => { skipRenewConfirmation => {
type => 'bool', type => 'bool',
default => 0, default => 0,

View File

@ -55,7 +55,7 @@ sub init {
} }
$self->idRule($rule); $self->idRule($rule);
$self->sorted( $self->conf->{impersonationRule} $self->sorted( $self->conf->{impersonationRule}
|| $self->conf->{contextSwitchingIdRule} ); || $self->conf->{contextSwitchingRule} );
return 1; return 1;
} }

View File

@ -25,11 +25,6 @@ has ott => (
has rule => ( is => 'rw', default => sub { 1 } ); has rule => ( is => 'rw', default => sub { 1 } );
has idRule => ( is => 'rw', default => sub { 1 } ); has idRule => ( is => 'rw', default => sub { 1 } );
sub hAttr {
$_[0]->{conf}->{contextSwitchingHiddenAttributes} . ' '
. $_[0]->{conf}->{hiddenAttributes};
}
sub init { sub init {
my ($self) = @_; my ($self) = @_;
my $hd = $self->p->HANDLER; my $hd = $self->p->HANDLER;