Skip to content
Snippets Groups Projects
Commit 41307eba authored by Mike McKay's avatar Mike McKay
Browse files

XNAT-4457 Fixed bug where admins could not approve PARs when users with some...

XNAT-4457 Fixed bug where admins could not approve PARs when users with some level of all data access requested access to projects. Once I fixed that I noticed that the admin was being directed to the project page with the actions box in the wrong place. I fixed this by no longer adding topTab (which seems to be deprecated) to the context.
parent 0c981cfe
No related branches found
No related tags found
No related merge requests found
...@@ -10,10 +10,6 @@ ...@@ -10,10 +10,6 @@
*/ */
package org.nrg.xnat.turbine.modules.actions; package org.nrg.xnat.turbine.modules.actions;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Map;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.apache.turbine.util.RunData; import org.apache.turbine.util.RunData;
...@@ -30,7 +26,6 @@ import org.nrg.xdat.security.helpers.Groups; ...@@ -30,7 +26,6 @@ import org.nrg.xdat.security.helpers.Groups;
import org.nrg.xdat.security.helpers.Permissions; import org.nrg.xdat.security.helpers.Permissions;
import org.nrg.xdat.security.helpers.Users; import org.nrg.xdat.security.helpers.Users;
import org.nrg.xdat.turbine.modules.actions.SecureAction; import org.nrg.xdat.turbine.modules.actions.SecureAction;
import org.nrg.xdat.turbine.utils.AdminUtils;
import org.nrg.xdat.turbine.utils.TurbineUtils; import org.nrg.xdat.turbine.utils.TurbineUtils;
import org.nrg.xft.event.EventMetaI; import org.nrg.xft.event.EventMetaI;
import org.nrg.xft.event.EventUtils; import org.nrg.xft.event.EventUtils;
...@@ -41,6 +36,10 @@ import org.nrg.xft.security.UserI; ...@@ -41,6 +36,10 @@ import org.nrg.xft.security.UserI;
import org.nrg.xnat.turbine.utils.ProjectAccessRequest; import org.nrg.xnat.turbine.utils.ProjectAccessRequest;
import org.nrg.xnat.utils.WorkflowUtils; import org.nrg.xnat.utils.WorkflowUtils;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Map;
public class ProcessAccessRequest extends SecureAction { public class ProcessAccessRequest extends SecureAction {
static Logger logger = Logger.getLogger(ProcessAccessRequest.class); static Logger logger = Logger.getLogger(ProcessAccessRequest.class);
...@@ -110,7 +109,7 @@ public class ProcessAccessRequest extends SecureAction { ...@@ -110,7 +109,7 @@ public class ProcessAccessRequest extends SecureAction {
//data.setScreenTemplate("XDATScreen_manage_xnat_projectData.vm"); //data.setScreenTemplate("XDATScreen_manage_xnat_projectData.vm");
//data.setScreenTemplate("/xnat_projectData/xnat_projectData_summary_management.vm"); //data.setScreenTemplate("/xnat_projectData/xnat_projectData_summary_management.vm");
TurbineUtils.SetSearchProperties(data, project); TurbineUtils.SetSearchProperties(data, project);
data.getParameters().setString("topTab", "Access"); //data.getParameters().setString("topTab", "Access");
this.redirectToReportScreen("XDATScreen_report_xnat_projectData.vm", project, data); this.redirectToReportScreen("XDATScreen_report_xnat_projectData.vm", project, data);
} }
...@@ -153,7 +152,7 @@ public class ProcessAccessRequest extends SecureAction { ...@@ -153,7 +152,7 @@ public class ProcessAccessRequest extends SecureAction {
try { try {
for (Map.Entry<String, UserGroupI> entry:Groups.getGroupsForUser(user).entrySet()){ for (Map.Entry<String, UserGroupI> entry:Groups.getGroupsForUser(user).entrySet()){
if (entry.getValue().getTag().equals(project.getId())){ if (entry.getValue()!=null && entry.getValue().getTag()!=null && entry.getValue().getTag().equals(project.getId())){
Groups.removeUserFromGroup(other, entry.getValue().getId(), c); Groups.removeUserFromGroup(other, entry.getValue().getId(), c);
} }
} }
...@@ -183,7 +182,7 @@ public class ProcessAccessRequest extends SecureAction { ...@@ -183,7 +182,7 @@ public class ProcessAccessRequest extends SecureAction {
//data.setScreenTemplate("XDATScreen_manage_xnat_projectData.vm"); //data.setScreenTemplate("XDATScreen_manage_xnat_projectData.vm");
//data.setScreenTemplate("/xnat_projectData/xnat_projectData_summary_management.vm"); //data.setScreenTemplate("/xnat_projectData/xnat_projectData_summary_management.vm");
TurbineUtils.SetSearchProperties(data, project); TurbineUtils.SetSearchProperties(data, project);
data.getParameters().setString("topTab", "Access"); //data.getParameters().setString("topTab", "Access");
this.redirectToReportScreen("XDATScreen_report_xnat_projectData.vm", project, data); this.redirectToReportScreen("XDATScreen_report_xnat_projectData.vm", project, data);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment