comparison Lib/IMPL/Security/Role.pm @ 94:79bf75223afe

Fixed security related bugs
author wizard
date Thu, 29 Apr 2010 01:31:27 +0400
parents 2f31ecabe9ea
children b56ebc31bf18
comparison
equal deleted inserted replaced
93:0667064553ef 94:79bf75223afe
18 18
19 sub Satisfy { 19 sub Satisfy {
20 my ($this,@roles) = @_; 20 my ($this,@roles) = @_;
21 21
22 return 1 unless $this->_FilterRoles( @roles ); 22 return 1 unless $this->_FilterRoles( @roles );
23 return 0;
23 } 24 }
24 25
25 sub _FilterRoles { 26 sub _FilterRoles {
26 my ($this,@roles) = @_; 27 my ($this,@roles) = @_;
27 28
28 @roles = grep not (ref $_ ? $this == $_ : $this->roleName eq $_), @roles; 29 @roles = grep not (ref $_ ? $this == $_ : $this->roleName eq $_), @roles;
29 30
30 @roles = $_->_FilterRoles(@roles) or return foreach @{$this->parentRoles} ; 31 @roles = $_->_FilterRoles(@roles) or return foreach $this->parentRoles ;
31 32
32 return @roles; 33 return @roles;
33 } 34 }
34 35
35 36