git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/auth-portlet-manager@134173 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
188d427cb8
commit
d6f4bf8aec
|
@ -13,7 +13,7 @@
|
||||||
<table cellspacing='0' cellpadding='0' style='width:100%;'>
|
<table cellspacing='0' cellpadding='0' style='width:100%;'>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign='top'>
|
<td valign='top'>
|
||||||
<c:DataGrid addStyleNames='{style.cellTable}' pageSize='30'
|
<c:DataGrid addStyleNames='{style.cellTable}' pageSize='50'
|
||||||
ui:field='dataGrid' />
|
ui:field='dataGrid' />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -23,12 +23,5 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</g:HTMLPanel>
|
</g:HTMLPanel>
|
||||||
|
|
||||||
</ui:UiBinder>
|
</ui:UiBinder>
|
|
@ -19,12 +19,8 @@ import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.common.scope.api.ScopeProvider;
|
|
||||||
import org.gcube.portlets.admin.authportletmanager.shared.ConstantsSharing;
|
import org.gcube.portlets.admin.authportletmanager.shared.ConstantsSharing;
|
||||||
import org.gcube.portlets.admin.authportletmanager.shared.PolicyAuth;
|
import org.gcube.portlets.admin.authportletmanager.shared.PolicyAuth;
|
||||||
import org.gcube.vomanagement.usermanagement.GroupManager;
|
|
||||||
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
|
|
||||||
import org.gcube.vomanagement.usermanagement.model.GCubeGroup;
|
|
||||||
|
|
||||||
import com.google.gwt.core.shared.GWT;
|
import com.google.gwt.core.shared.GWT;
|
||||||
import com.google.gwt.view.client.HasData;
|
import com.google.gwt.view.client.HasData;
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
package org.gcube.portlets.admin.authportletmanager.client.pagelayout;
|
package org.gcube.portlets.admin.authportletmanager.client.pagelayout;
|
||||||
|
|
||||||
import org.gcube.portlets.admin.authportletmanager.client.AuthManagerController;
|
import org.gcube.portlets.admin.authportletmanager.client.AuthManagerController;
|
||||||
import org.gcube.portlets.admin.authportletmanager.client.Entities;
|
|
||||||
import org.gcube.portlets.admin.authportletmanager.client.event.ListPolicyEvent;
|
import org.gcube.portlets.admin.authportletmanager.client.event.ListPolicyEvent;
|
||||||
import org.gcube.portlets.admin.authportletmanager.client.widget.BulletList;
|
import org.gcube.portlets.admin.authportletmanager.client.widget.BulletList;
|
||||||
import org.gcube.portlets.admin.authportletmanager.client.widget.ListItem;
|
import org.gcube.portlets.admin.authportletmanager.client.widget.ListItem;
|
||||||
import org.gcube.portlets.admin.authportletmanager.client.widget.Paragraph;
|
import org.gcube.portlets.admin.authportletmanager.client.widget.Paragraph;
|
||||||
import org.gcube.portlets.admin.authportletmanager.client.widget.Span;
|
import org.gcube.portlets.admin.authportletmanager.client.widget.Span;
|
||||||
import org.gcube.portlets.admin.authportletmanager.shared.Caller.TypeCaller;
|
import org.gcube.portlets.admin.authportletmanager.shared.Caller.TypeCaller;
|
||||||
import org.gcube.portlets.admin.authportletmanager.shared.ConstantsSharing;
|
|
||||||
import org.gcube.portlets.widgets.widgettour.client.extendedclasses.GCubeTour;
|
import org.gcube.portlets.widgets.widgettour.client.extendedclasses.GCubeTour;
|
||||||
|
|
||||||
import com.ait.toolkit.hopscotch.client.Placement;
|
import com.ait.toolkit.hopscotch.client.Placement;
|
||||||
|
|
|
@ -17,6 +17,7 @@ import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
import org.gcube.application.framework.core.session.ASLSession;
|
import org.gcube.application.framework.core.session.ASLSession;
|
||||||
|
import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
|
||||||
import org.gcube.common.authorization.library.policies.Action;
|
import org.gcube.common.authorization.library.policies.Action;
|
||||||
import org.gcube.common.authorization.library.policies.Policy;
|
import org.gcube.common.authorization.library.policies.Policy;
|
||||||
import org.gcube.common.authorization.library.policies.PolicyType;
|
import org.gcube.common.authorization.library.policies.PolicyType;
|
||||||
|
@ -53,7 +54,6 @@ import org.gcube.vomanagement.usermanagement.model.GCubeRole;
|
||||||
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
||||||
|
|
||||||
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
||||||
|
|
||||||
import com.liferay.portal.kernel.log.Log;
|
import com.liferay.portal.kernel.log.Log;
|
||||||
import com.liferay.portal.kernel.log.LogFactoryUtil;
|
import com.liferay.portal.kernel.log.LogFactoryUtil;
|
||||||
|
|
||||||
|
@ -101,9 +101,12 @@ implements AuthManagerService {
|
||||||
logger.debug("loadListPolicy found context:"+null);
|
logger.debug("loadListPolicy found context:"+null);
|
||||||
context=aslSession.getScope();
|
context=aslSession.getScope();
|
||||||
}
|
}
|
||||||
String token= authorizationService().resolveTokenByUserAndContext(username, context);
|
String token;
|
||||||
if (token==null)
|
try{
|
||||||
token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
token= authorizationService().resolveTokenByUserAndContext(username, context);
|
||||||
|
}catch (ObjectNotFound e){
|
||||||
|
token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
||||||
|
}
|
||||||
|
|
||||||
if (ConstantsSharing.DEBUG_MODE) {
|
if (ConstantsSharing.DEBUG_MODE) {
|
||||||
token=ConstantsSharing.DEBUG_TOKEN;
|
token=ConstantsSharing.DEBUG_TOKEN;
|
||||||
|
@ -203,9 +206,12 @@ implements AuthManagerService {
|
||||||
if (context==null)
|
if (context==null)
|
||||||
context=aslSession.getScope();
|
context=aslSession.getScope();
|
||||||
|
|
||||||
String token= authorizationService().resolveTokenByUserAndContext(username, context);
|
String token;
|
||||||
if (token==null)
|
try{
|
||||||
token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
token= authorizationService().resolveTokenByUserAndContext(username, context);
|
||||||
|
}catch (ObjectNotFound e){
|
||||||
|
token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
||||||
|
}
|
||||||
//String token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
//String token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
||||||
if (ConstantsSharing.DEBUG_MODE) {
|
if (ConstantsSharing.DEBUG_MODE) {
|
||||||
token=ConstantsSharing.DEBUG_TOKEN;
|
token=ConstantsSharing.DEBUG_TOKEN;
|
||||||
|
@ -286,9 +292,12 @@ implements AuthManagerService {
|
||||||
else{
|
else{
|
||||||
//Get List service
|
//Get List service
|
||||||
String username = aslSession.getUsername();
|
String username = aslSession.getUsername();
|
||||||
String token= authorizationService().resolveTokenByUserAndContext(username, context);
|
String token;
|
||||||
if (token==null)
|
try{
|
||||||
token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
token= authorizationService().resolveTokenByUserAndContext(username, context);
|
||||||
|
}catch (ObjectNotFound e){
|
||||||
|
token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
||||||
|
}
|
||||||
//String token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
//String token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
||||||
SecurityTokenProvider.instance.set(token);
|
SecurityTokenProvider.instance.set(token);
|
||||||
|
|
||||||
|
@ -417,9 +426,12 @@ implements AuthManagerService {
|
||||||
List<Policy> policies = new ArrayList<Policy>();
|
List<Policy> policies = new ArrayList<Policy>();
|
||||||
//String token =aslSession.getSecurityToken();
|
//String token =aslSession.getSecurityToken();
|
||||||
String username = aslSession.getUsername();
|
String username = aslSession.getUsername();
|
||||||
String token= authorizationService().resolveTokenByUserAndContext(username, context);
|
String token;
|
||||||
if (token==null)
|
try{
|
||||||
token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
token= authorizationService().resolveTokenByUserAndContext(username, context);
|
||||||
|
}catch (ObjectNotFound e){
|
||||||
|
token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
||||||
|
}
|
||||||
//String token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
//String token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
||||||
|
|
||||||
if (ConstantsSharing.DEBUG_MODE) {
|
if (ConstantsSharing.DEBUG_MODE) {
|
||||||
|
@ -499,9 +511,12 @@ implements AuthManagerService {
|
||||||
if (context==null)
|
if (context==null)
|
||||||
context=aslSession.getScope();
|
context=aslSession.getScope();
|
||||||
String username = aslSession.getUsername();
|
String username = aslSession.getUsername();
|
||||||
String token= authorizationService().resolveTokenByUserAndContext(username, context);
|
String token;
|
||||||
if (token==null)
|
try{
|
||||||
token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
token= authorizationService().resolveTokenByUserAndContext(username, context);
|
||||||
|
}catch (ObjectNotFound e){
|
||||||
|
token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
||||||
|
}
|
||||||
//String token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
//String token = authorizationService().generateUserToken(new UserInfo(username, new ArrayList<String>()), context);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue