ispman/lib/ISPMan DomainMan.pm,1.63,1.64

Joerg Delker <[email protected]>
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/lib/ISPMan
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27628/lib/ISPMan

Modified Files:
	DomainMan.pm 
Log Message:
fixed isDomainLocked, isDomainEditable

Index: DomainMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/DomainMan.pm,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- DomainMan.pm	1 May 2004 20:57:59 -0000	1.63
+++ DomainMan.pm	1 May 2004 23:48:00 -0000	1.64
@@ -631,16 +631,10 @@
 
 
    my $entry=$self->getEntry($dn, 'objectclass=ispmanDomain', $attribute);
-   
-   
-   # old method. call get_value on entry
-   # $self->{'domaininfo'}{$domain}{$attribute}=$entry->get_value($attribute);
-   
-   # %%% new method %%%
+
    # call get_attr_value on ispman object. 
    # This will take care of converting utf to lat
    # also it may be useful to do caching etc
-
    $self->{'domaininfo'}{$domain}{$attribute}=$self->get_attr_value($entry, $attribute);
    return $self->{'domaininfo'}{$domain}{$attribute};
 
@@ -1135,10 +1129,10 @@
 sub isDomainEditable {
    my $self=shift;
    my $domain=shift;
-   
 
-   if ($self->isDomainLocked($domain) && $self->isDomainLocked($domain) eq "true"){
-      if ($self->domainLockedBy($domain) eq $self->{'REMOTE_USER'}) {
+   if ($self->isDomainLocked($domain)){
+     if ($self->domainLockedBy($domain) eq $self->{'REMOTE_USER'} ||
+	 $self->requiredAdminLevel(100)) {
          return 1;
       } else {
          return 0;
@@ -1152,7 +1146,9 @@
 sub isDomainLocked {
    my $self=shift;
    my $domain=shift;
-   return $self->getDomainAttribute($domain, "ispmanDomainLocked");
+
+   my $locked=${$self->getDomainAttribute($domain, "ispmanDomainLocked")}[0]||"";
+   return ($locked eq "true")? 1:0;
 
 =item B<isDomainLocked>
 



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.