Hi Dave,
> I was able to confirm that IP authentication is working by setting the log
> level to DEBUG. Users coming from configured IPs are getting the special
> group ID added, as expected. However, I am still unable to give such users
> READ access to bitstreams that (only) have a READ authorization for the above
> group.
I've just spent all morning trying to debug this, as I'm seeing the same
behaviour in 1.6.
It turns out that a bug fixed in 1.6 has introduced another - to solve a
problem where all users were being shown as added to the special groups that
the admin belonged to, the group checking code was changed to only check for
the user who is logged in. But this upsets IP Authentication which typically
works for users who are not logged in.
To fix the problem, go to your DSpace source, and edit
[dspace-src]/dspace-api/src/main/java/org/dspace/eperson/Group.java
Around line 482 you'll see:
if ((c.getCurrentUser() != null) && (c.getCurrentUser().getID() == e.getID()))
{
Group[] specialGroups = c.getSpecialGroups();
for(Group special : specialGroups)
{
groupIDs.add(new Integer(special.getID()));
}
}
Edit the first and last lines of the code snippet, and add a double slash '//'
before the 'if' line, and the opening and closing brace at the end. Then
rebuild dspace (mvn package; ant update etc), redeploy the webapps to tomcat,
restart etc, and hopefully it will then start to work again.
Your code should read:
//if ((c.getCurrentUser() != null) && (c.getCurrentUser().getID() == e.getID()))
//{
Group[] specialGroups = c.getSpecialGroups();
for(Group special : specialGroups)
{
groupIDs.add(new Integer(special.getID()));
}
//}
This will of course get fixed in the next release - 1.6.1.
Thanks,
Stuart Lewis
IT Innovations Analyst and Developer
Te Tumu Herenga The University of Auckland Library
Auckland Mail Centre, Private Bag 92019, Auckland 1142, New Zealand
Ph: 64 9 373-7599 x81928
http://www.library.auckland.ac.nz/
------------------------------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel