Changeset 28161 for main/trunk


Ignore:
Timestamp:
2013-08-27T11:26:01+12:00 (11 years ago)
Author:
sjm84
Message:

Fixed a silly mistake that was causing non-admins to not be able to change their account settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/Authentication.java

    r28120 r28161  
    142142    public void cleanUp()
    143143    {
    144 
    145144        super.cleanUp();
    146145
     
    162161            _derbyWrapperDoneForcedShutdown = true;
    163162        }
    164 
    165163    }
    166164
     
    249247    }
    250248
    251     protected void addCustomParams(String service, Element param_list, String lang)
    252     {
    253     }
    254 
    255     protected void createParameter(String name, Element param_list, String lang)
    256     {
    257     }
    258 
    259249    protected Element processGetUserInformation(Element request)
    260250    {
     
    332322        result.setAttribute(GSXML.FROM_ATT, AUTHENTICATION_SERVICE);
    333323        result.setAttribute(GSXML.TYPE_ATT, GSXML.REQUEST_TYPE_PROCESS);
    334 
    335         String[] userGroups = (new UserContext(request)).getGroups();
    336 
    337         boolean found = false;
    338         for (String group : userGroups)
    339         {
    340             if (group.equals("administrator"))
    341             {
    342                 found = true;
    343             }
    344         }
    345 
    346         if (!found)
    347         {
    348             GSXML.addError(this.doc, result, "This user does not have the required permissions to perform this action.");
    349             return result;
    350         }
    351324
    352325        // Create an Authentication node put into the result
Note: See TracChangeset for help on using the changeset viewer.