mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-09 02:54:20 +00:00
[DS-309] Shiboleth default roles are applied also to anonymous user and user logged-in with other methods
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4308 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -203,6 +203,8 @@ public class ShibAuthentication implements AuthenticationMethod
|
||||
{
|
||||
// the person exists, just return ok
|
||||
context.setCurrentUser(eperson);
|
||||
request.getSession().setAttribute("shib.authenticated",
|
||||
new Boolean("true"));
|
||||
}
|
||||
|
||||
return AuthenticationMethod.SUCCESS;
|
||||
@@ -215,7 +217,13 @@ public class ShibAuthentication implements AuthenticationMethod
|
||||
*/
|
||||
public int[] getSpecialGroups(Context context, HttpServletRequest request)
|
||||
{
|
||||
|
||||
// no user logged in or user not logged from shibboleth
|
||||
if (context.getCurrentUser() == null
|
||||
|| request.getSession().getAttribute("shib.authenticated") == null)
|
||||
{
|
||||
return new int[0];
|
||||
}
|
||||
|
||||
if (request.getSession().getAttribute("shib.specialgroup") != null)
|
||||
{
|
||||
return (int[]) request.getSession().getAttribute(
|
||||
|
Reference in New Issue
Block a user