Changeset 27164 for main/trunk/greenstone3/src/java/org
- Timestamp:
- 2013-04-10T13:22:45+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/Authentication.java
r27075 r27164 17 17 import org.greenstone.gsdl3.util.DerbyWrapper; 18 18 import org.greenstone.gsdl3.util.GSXML; 19 import org.greenstone.gsdl3.util.UserContext; 19 20 import org.greenstone.gsdl3.util.UserQueryResult; 20 21 import org.greenstone.gsdl3.util.UserTermInfo; … … 331 332 result.setAttribute(GSXML.TYPE_ATT, GSXML.REQUEST_TYPE_PROCESS); 332 333 334 String[] userGroups = (new UserContext(request)).getGroups(); 335 336 boolean found = false; 337 for (String group : userGroups) 338 { 339 if (group.equals("administrator")) 340 { 341 found = true; 342 } 343 } 344 345 if (!found) 346 { 347 GSXML.addError(this.doc, result, "This user does not have the required permissions to perform this action."); 348 return result; 349 } 350 333 351 // Create an Authentication node put into the result 334 352 Element authenNode = this.doc.createElement(GSXML.AUTHEN_NODE_ELEM);
Note:
See TracChangeset
for help on using the changeset viewer.