[Task #17524] Hiding 'Add Administrator" on VRE Folders
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@181718 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d1cf00e69e
commit
5699ae6115
|
@ -5,10 +5,16 @@
|
|||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="workspace-uploader-2.0.3-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-uploader-TRUNK/workspace-uploader-TRUNK">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="storagehub-client-wrapper-0.6.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/storagehub-client-wrapper-TRUNK/storagehub-client-wrapper-TRUNK">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="workspace-tree-widget-6.27.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/WorkspaceTree-TRUNK/WorkspaceTree-TRUNK">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="ws-task-executor-widget-0.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ws-task-executor-widget-TRUNK/ws-task-executor-widget-TRUNK">
|
||||
<dependent-module archiveName="ws-thredds-sync-widget-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ws-thredds-sync-widget-TRUNK/ws-thredds-sync-widget-TRUNK">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
component="org.gcube.portlets-user.workspace-portlet.6-23-0"
|
||||
date="${buildDate}">
|
||||
<Change>[Task #17226] Removing HL </Change>
|
||||
<Change>[Task #17524] Hiding 'Add Administrator" on VRE Folders</Change>
|
||||
</Changeset>
|
||||
<Changeset
|
||||
component="org.gcube.portlets-user.workspace-portlet.6-22-0"
|
||||
|
|
|
@ -1047,7 +1047,7 @@ public class AppController implements SubscriberInterface {
|
|||
wsPortlet.getBorderLayoutContainer().updateDnDParentId(parent.getIdentifier());
|
||||
|
||||
if(parent.isDirectory() && parent.isShared()){ //IS SHARED FOLDER, ENABLING OPERATION FOR ACTIVE BREADCRUMB
|
||||
setACLInfo(parent.getIdentifier());
|
||||
setACLInfo(parent);
|
||||
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().enableButtonForActiveBreadcrumb(parent);
|
||||
}else if(parent.isSpecialFolder()){ //IS SPECIAL FOLDER? DISABLING BUTTONS
|
||||
GWT.log("Update Breadcrumb is special folder.. disabling special folder buttons");
|
||||
|
@ -1070,28 +1070,32 @@ public class AppController implements SubscriberInterface {
|
|||
*
|
||||
* @param parentId the new ACL info
|
||||
*/
|
||||
private void setACLInfo(final String parentId){
|
||||
private void setACLInfo(final FileModel toParentACL){
|
||||
|
||||
if(parentId==null){
|
||||
if(toParentACL==null){
|
||||
wsPortlet.getToolBarItemDetails().updateACLInfo(null);
|
||||
return;
|
||||
}
|
||||
|
||||
GWT.log("Updating ACL info for folder id: "+parentId);
|
||||
WorkspaceSharingServiceAsync.INSTANCE.getUserACLForFolderId(parentId, new AsyncCallback<List<ExtendedWorkspaceACL>>() {
|
||||
GWT.log("Updating ACL info for folder id: "+toParentACL.getIdentifier());
|
||||
WorkspaceSharingServiceAsync.INSTANCE.getUserACLForFolderId(toParentACL.getIdentifier(), new AsyncCallback<List<ExtendedWorkspaceACL>>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
GWT.log("Failed: "+arg0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<ExtendedWorkspaceACL> res) {
|
||||
FileModel parent = wsPortlet.getToolBarPath().getLastParent();
|
||||
ConstantsExplorer.log("Validating correct ACL id: "+parentId +" and "+parent.getIdentifier());
|
||||
if(parentId.compareTo(parent.getIdentifier())==0){
|
||||
GWT.log("Validating correct ACL id: "+toParentACL.getIdentifier() +" and "+parent.getIdentifier());
|
||||
if(toParentACL.getIdentifier().compareTo(parent.getIdentifier())==0){
|
||||
if(res!=null && res.size()>0){
|
||||
wsPortlet.getToolBarItemDetails().updateACLInfo(res.get(0));
|
||||
|
||||
//see Task #17524
|
||||
if(!parent.isVreFolder())
|
||||
wsPortlet.getToolBarItemDetails().updateAddAdministatorInfo(AppControllerExplorer.myLogin, res.get(0));
|
||||
}
|
||||
}
|
||||
|
@ -1897,16 +1901,16 @@ public class AppController implements SubscriberInterface {
|
|||
* @see org.gcube.portlets.user.workspace.client.interfaces.SubscriberInterface#updatedVREPermissions(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void updatedVREPermissions(String vreFolderId) {
|
||||
public void updatedVREPermissions(FileModel vreFolder) {
|
||||
|
||||
GxtBreadcrumbPathPanel breadCrumb = this.wsPortlet.getToolBarPath();
|
||||
FileModel parent = breadCrumb.getLastParent();
|
||||
|
||||
if(parent!=null)
|
||||
GWT.log("UpdatedVREPermissions comparing "+vreFolderId +" and "+parent.getIdentifier());
|
||||
GWT.log("UpdatedVREPermissions comparing "+vreFolder.getIdentifier() +" and "+parent.getIdentifier());
|
||||
//IF VRE FOLDER (UPDATED) IS CURRENT BREADCRUMB DISPLAING -> UPDATE
|
||||
if(vreFolderId!=null && parent!=null && vreFolderId.compareToIgnoreCase(parent.getIdentifier())==0){
|
||||
setACLInfo(vreFolderId);
|
||||
if(vreFolder.getIdentifier()!=null && parent!=null && vreFolder.getIdentifier().compareToIgnoreCase(parent.getIdentifier())==0){
|
||||
setACLInfo(vreFolder);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue