ref 17169: Selection of users in the Sharing panel

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

Added support to workspace users discovery by VREs

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@181360 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2019-07-30 14:57:52 +00:00
parent 504227ca30
commit c97443dbc5
1 changed files with 23 additions and 25 deletions

View File

@ -158,7 +158,6 @@ public class DialogShareFolder extends Dialog {
lc.mask();
// TODO
userStore.getOwner(folder.getIdentifier(), new AsyncCallback<InfoContactModel>() {
@ -230,15 +229,14 @@ public class DialogShareFolder extends Dialog {
*/
private void updateRecipientOfShare(List<InfoContactModel> listContacts) {
suggestPanel.resetItemSelected();
if (shareOwner != null) {
suggestPanel.addRecipient(shareOwner, false);
}
for (InfoContactModel contact : listContacts) {
if (contact != null && contact.getName() != null) {
if (!isShareOwner(contact)) // skip owner
if (!isShareOwner(contact)) {// skip owner
suggestPanel.addRecipient(contact, true);
else
suggestPanel.addRecipient(contact, false); // owner
// is
// not
// deletable
}
}
}
}
@ -464,7 +462,8 @@ public class DialogShareFolder extends Dialog {
@Override
public void onClick(ClickEvent event) {
final DialogMultiDragWorkspaceContacts dialogMultiDrag = new DialogMultiDragWorkspaceContacts(shareOwner,suggestPanel.getSelectedUser());
final DialogMultiDragWorkspaceContacts dialogMultiDrag = new DialogMultiDragWorkspaceContacts(
shareOwner, suggestPanel.getSelectedUser());
dialogMultiDrag.getButtonById(Dialog.OK).addSelectionListener(new SelectionListener<ButtonEvent>() {
@ -475,7 +474,8 @@ public class DialogShareFolder extends Dialog {
if (shareOwner != null) {
suggestPanel.addRecipient(shareOwner, false);
}
for (InfoContactModel infoContactModel : dialogMultiDrag.getMultiDrag().getTargetListContact()) {
for (InfoContactModel infoContactModel : dialogMultiDrag.getMultiDrag()
.getTargetListContact()) {
suggestPanel.addRecipient(infoContactModel, true);
}
suggestPanel.boxSetFocus();
@ -509,19 +509,17 @@ public class DialogShareFolder extends Dialog {
* @param contact
* the contact
* @return true, if successful
private boolean listAlreadySharedContains(InfoContactModel contact) {
if (contact == null)
return false;
for (InfoContactModel ct : listAlreadyShared) {
if (InfoContactModel.COMPARATORLOGINS.compare(ct, contact) == 0)
// if(ct.getLogin().compareTo(contact.getLogin())==0)
return true;
}
return false;
} */
*
* private boolean listAlreadySharedContains(InfoContactModel
* contact) {
*
* if (contact == null) return false;
*
* for (InfoContactModel ct : listAlreadyShared) { if
* (InfoContactModel.COMPARATORLOGINS.compare(ct, contact) == 0) //
* if(ct.getLogin().compareTo(contact.getLogin())==0) return true; }
* return false; }
*/
// DEBUG
/**