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:
parent
504227ca30
commit
c97443dbc5
|
@ -157,9 +157,8 @@ public class DialogShareFolder extends Dialog {
|
|||
lc.add(hpPermission);
|
||||
|
||||
lc.mask();
|
||||
|
||||
|
||||
//TODO
|
||||
|
||||
// TODO
|
||||
userStore.getOwner(folder.getIdentifier(), new AsyncCallback<InfoContactModel>() {
|
||||
|
||||
@Override
|
||||
|
@ -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>() {
|
||||
|
||||
|
@ -472,10 +471,11 @@ public class DialogShareFolder extends Dialog {
|
|||
public void componentSelected(ButtonEvent ce) {
|
||||
// initSuggestContacts();
|
||||
suggestPanel.resetItemSelected();
|
||||
if(shareOwner!=null){
|
||||
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
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue