Ready for integration testing with JoinVRE
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/join-vre@113463 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
65f7f5924b
commit
b69c5763d1
|
@ -27,6 +27,10 @@ import com.liferay.portal.kernel.servlet.ImageServletTokenUtil;
|
||||||
import com.liferay.portal.kernel.util.WebKeys;
|
import com.liferay.portal.kernel.util.WebKeys;
|
||||||
import com.liferay.portal.model.Group;
|
import com.liferay.portal.model.Group;
|
||||||
import com.liferay.portal.model.Organization;
|
import com.liferay.portal.model.Organization;
|
||||||
|
import com.liferay.portal.model.User;
|
||||||
|
import com.liferay.portal.security.permission.PermissionChecker;
|
||||||
|
import com.liferay.portal.security.permission.PermissionCheckerFactoryUtil;
|
||||||
|
import com.liferay.portal.security.permission.PermissionThreadLocal;
|
||||||
import com.liferay.portal.service.OrganizationLocalServiceUtil;
|
import com.liferay.portal.service.OrganizationLocalServiceUtil;
|
||||||
import com.liferay.portal.service.UserLocalServiceUtil;
|
import com.liferay.portal.service.UserLocalServiceUtil;
|
||||||
import com.liferay.portal.theme.ThemeDisplay;
|
import com.liferay.portal.theme.ThemeDisplay;
|
||||||
|
@ -125,8 +129,6 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
|
||||||
private static final String REQUEST_BASED_GROUP = "Requestbasedgroup";
|
private static final String REQUEST_BASED_GROUP = "Requestbasedgroup";
|
||||||
|
|
||||||
public boolean requireAccessGrant(Organization organization) throws PortalException, SystemException {
|
public boolean requireAccessGrant(Organization organization) throws PortalException, SystemException {
|
||||||
return true;
|
|
||||||
/*
|
|
||||||
try {
|
try {
|
||||||
long companyId = OrganizationsUtil.getCompany().getCompanyId();
|
long companyId = OrganizationsUtil.getCompany().getCompanyId();
|
||||||
_log.trace("Setting Thread Permission");
|
_log.trace("Setting Thread Permission");
|
||||||
|
@ -136,16 +138,15 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
|
||||||
_log.trace("Setting Permission ok!");
|
_log.trace("Setting Permission ok!");
|
||||||
|
|
||||||
if (organization.getExpandoBridge().getAttribute(REQUEST_BASED_GROUP) == null || organization.getExpandoBridge().getAttribute(REQUEST_BASED_GROUP).equals("")) {
|
if (organization.getExpandoBridge().getAttribute(REQUEST_BASED_GROUP) == null || organization.getExpandoBridge().getAttribute(REQUEST_BASED_GROUP).equals("")) {
|
||||||
_log.trace("Attribute {} not initialized. In this case by default Access Grant is permitted", REQUEST_BASED_GROUP);
|
_log.trace(String.format("Attribute %s not initialized. In this case by default Access Grant is permitted", REQUEST_BASED_GROUP));
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
String attributeValue = (String) organization.getExpandoBridge().getAttribute(REQUEST_BASED_GROUP);
|
String attributeValue = (String) organization.getExpandoBridge().getAttribute(REQUEST_BASED_GROUP);
|
||||||
return (attributeValue.compareTo("true") == 0);
|
return (attributeValue.compareTo("true") == 0);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<VRE> getPortalOrganizationMappedToVRE() throws SystemException, PortalException {
|
public ArrayList<VRE> getPortalOrganizationMappedToVRE() throws SystemException, PortalException {
|
||||||
|
|
Loading…
Reference in New Issue