Hi Clive, As far as I can remember, no changes have been made to the authentication system internals (other than introduction of session invalidation) in 1.6, so the same changes (or just the same .java file) should work fine.
(No guarantees, but I'm pretty sure it will work perfectyl!) Cheers, Stuart ________________________________________ From: Clive Gould [[email protected]] Sent: Thursday, 11 March 2010 4:55 a.m. To: [email protected] Cc: Stuart Lewis Subject: DSpace 1.6.0 and special groups Hi Stuart You kindly helped me customise the special groups code in /home/dspace/dspace-1.5.2-src-release/dspace-api/src/main/java/org/dspace/authenticate/LDAPHierarchicalAuthentication.java to differentiate between staff and student login. I have just downloaded the source code for dspace 1.6.0 and looked at the above file. Before I take the plunge, can you please confirm that the patch we applied below will still work with the 1.6.0 code? Thanks very much Clive /* * New code written by Stuart Lewis and added by Clive Gould on 28th April 2009 */ public int[] getSpecialGroups(Context context, HttpServletRequest request) { try { if (!context.getCurrentUser().getNetid().equals("")) { Group staffGroup = Group.findByName(context, "all-staff"); Group studentsGroup = Group.findByName(context, "all-students"); // Does the username start with a '1'? if ((studentsGroup != null) && context.getCurrentUser().getNetid().startsWith("1"))) { // Add them to the students group return new int[] { studentsGroup.getID() }; } else if (staffGroup != null) { // Add them to the staff group return new int[] { staffGroup.getID() }; } } } catch (Exception npe) { // The user is not an LDAP user, so we don't need to worry about them } return new int[0]; } ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ DSpace-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspace-tech

