avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject cvs commit: jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver SiteCommandHandler.java
Date Mon, 01 Apr 2002 17:25:23 GMT
rana_b      02/04/01 09:25:23

  Modified:    ftpserver/src/java/org/apache/avalon/ftpserver
                        SiteCommandHandler.java
  Log:
  get admin user name
  
  Revision  Changes    Path
  1.2       +4 -2      jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver/SiteCommandHandler.java
  
  Index: SiteCommandHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver/SiteCommandHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SiteCommandHandler.java	31 Mar 2002 16:44:33 -0000	1.1
  +++ SiteCommandHandler.java	1 Apr 2002 17:25:23 -0000	1.2
  @@ -95,10 +95,12 @@
       
       
       /**
  -     * Has permission
  +     * Has permission. 
        */
       private boolean hasPermission(String args[]) {
  -        if ( args == null || mUser.getIsAdmin() ) {
  +        UserManagerInterface userManager = mConfig.getUserManager();
  +        String adminName = userManager.getAdminName();
  +        if ( args == null || mUser.getName().equals(adminName) ) {
               return true;
           }
           return ( (args.length > 0) && "HELP".equalsIgnoreCase(args[0]) );
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message