ref 17169: Selection of users in the Sharing panel

https://support.d4science.org/issues/17169

Updated support to VREs discovery

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@181387 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2019-08-01 08:07:26 +00:00
parent bedf1b6a71
commit e4cac2c292
1 changed files with 10 additions and 3 deletions

View File

@ -432,7 +432,6 @@ public class DialogShareFolder extends Dialog {
* @return the shared list users
*/
public List<InfoContactModel> getSharedListUsers() {
// printSelectedUser();
return suggestPanel.getSelectedUser();
}
@ -579,12 +578,20 @@ public class DialogShareFolder extends Dialog {
txtName.focus();
return false;
}
if (getSharedListUsers().size() <= 1) {
List<InfoContactModel> listUsers=suggestPanel.getSelectedUser();
if (listUsers==null||listUsers.size() < 1) {
if (displayAlert)
new MessageBoxAlert("Attention", "You must pick at least one user with which share the folder", null);
suggestPanel.boxSetFocus();
return false;
} else {
if(listUsers.size()==1&&listUsers.contains(shareOwner)){
if (displayAlert)
new MessageBoxAlert("Attention", "You must pick at least one user with which share the folder different from the owner", null);
suggestPanel.boxSetFocus();
return false;
}
}
return true;