mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 06:07:57 +01:00
Merged WISE-436-fixErrorChangingRoleInSharing into develop
This commit is contained in:
commit
e7ce96fd30
@ -412,17 +412,17 @@ public class MindmapController extends BaseController {
|
|||||||
throw new IllegalArgumentException(roleStr + " is not a valid role");
|
throw new IllegalArgumentException(roleStr + " is not a valid role");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove from the list of pendings to remove ...
|
||||||
|
if (collaboration != null) {
|
||||||
|
collabsToRemove.remove(collaboration);
|
||||||
|
}
|
||||||
|
|
||||||
// Is owner ?
|
// Is owner ?
|
||||||
final CollaborationRole role = CollaborationRole.valueOf(roleStr.toUpperCase());
|
final CollaborationRole role = CollaborationRole.valueOf(roleStr.toUpperCase());
|
||||||
if (role != CollaborationRole.OWNER) {
|
if (role != CollaborationRole.OWNER) {
|
||||||
mindmapService.addCollaboration(mindMap, restCollab.getEmail(), role, restCollabs.getMessage());
|
mindmapService.addCollaboration(mindMap, restCollab.getEmail(), role, restCollabs.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove from the list of pendings to remove ...
|
|
||||||
if (collaboration != null) {
|
|
||||||
collabsToRemove.remove(collaboration);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all collaborations that no applies anymore ..
|
// Remove all collaborations that no applies anymore ..
|
||||||
|
@ -37,10 +37,12 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||||||
isGetterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY)
|
isGetterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY)
|
||||||
public class RestCollaboration {
|
public class RestCollaboration {
|
||||||
|
|
||||||
|
private long id;
|
||||||
private String email;
|
private String email;
|
||||||
private String role;
|
private String role;
|
||||||
|
|
||||||
public RestCollaboration(@NotNull Collaboration collaboration) {
|
public RestCollaboration(@NotNull Collaboration collaboration) {
|
||||||
|
this.id = collaboration.getId();
|
||||||
this.email = collaboration.getCollaborator().getEmail();
|
this.email = collaboration.getCollaborator().getEmail();
|
||||||
this.role = collaboration.getRole().getLabel();
|
this.role = collaboration.getRole().getLabel();
|
||||||
}
|
}
|
||||||
@ -59,6 +61,10 @@ public class RestCollaboration {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
public String getRole() {
|
public String getRole() {
|
||||||
return role;
|
return role;
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,7 @@ $(function () {
|
|||||||
success:function (data, textStatus, jqXHR) {
|
success:function (data, textStatus, jqXHR) {
|
||||||
// Owner roles is the first in the table ...
|
// Owner roles is the first in the table ...
|
||||||
var collabs = data.collaborations.sort(function (a, b) {
|
var collabs = data.collaborations.sort(function (a, b) {
|
||||||
return a.role <= b.role;
|
return a.id > b.id;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add all the columns in the table ...
|
// Add all the columns in the table ...
|
||||||
|
Loading…
Reference in New Issue
Block a user