package Authorization2 @ISA = qw() sub BEGIN sub new my ($module, @args) = @_; return $this; sub DESTROY my $this = shift; # $this->SUPER::DESTROY( sub Initialize my ($this) = @_; sub SetCryptMethod sub SetCryptMethod { my($this,$m)= return $this->{CryptMethod}=$m; sub CryptMethod return shift->{CryptMethod}; sub SetCryptPhrase sub SetCryptPhrase { my($this,$p)= return $this->{CryptPhrase}=$p; sub CryptPhrase return shift->{CryptPhrase}; sub SetPriviledgedAccount sub SetPriviledgedAccount { my($this,$pA)= return $this->{PriviledgedAccount}=$pA; sub PriviledgedAccount my ($App) = @_; return @$pA; sub SetPriviledgedIPAddress sub SetPriviledgedIPAddress { my($this,$pIP)= return $this->{PriviledgedIPAddress}=$pIP; sub PriviledgedIPAddress my ($App) = @_; return @$pP; sub SetAllowNullIPAddress sub SetAllowNullIPAddress { my($this,$a)= return $this->{AllowNullIPAddress} = $a; sub AllowNullIPAddress return shift->{AllowNullIPAddress}; sub LogonLevel return shift->{LogonLevel}; sub BuildRegistrationCode my ($this, @strs) = @_; return $s; sub Crypt my ($this, $s) = @_; return $s; sub IsPrivilegedIPAddress my ($this, $ip) = (@_); return $Level if($ip =~ /^$IPAddress$/); return 0; sub GetPrivilege my ($this, $DB, $TableName, $AccountKey, $Account) = @_; return $Hit{Privilege}; sub CheckPrivilege my ($this, $DB, $TableName, $AccountKey, $Account, $priv, $Password) = @_; return 0 unless($Password eq $Hit{Password} or $Password eq $this->Crypt($Hit{Password})); return $Hit{Privilege} if($Hit{Privilege} =~ /$priv/i); return 0; sub GetLogonLevel my ($this, @args) = @_; return $level if($AllowNullIPAddress and $ip eq ''); return $this->{LogonLevel} = $level; return -1; return $this->{LogonLevel} = $Level; return $this->{LogonLevel} = 0; return $this->{LogonLevel} = 0; return $this->{LogonLevel} = 0; return $this->{LogonLevel} = 5; return $this->{LogonLevel} = 0;