|
|
|
@ -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,29 +1070,33 @@ 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));
|
|
|
|
|
wsPortlet.getToolBarItemDetails().updateAddAdministatorInfo(AppControllerExplorer.myLogin, 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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|