Merge pull request #19124 from nextcloud/bug/13647/ignore-delete-groups

Exclude groups from sharing: Skip delete groups
This commit is contained in:
Morris Jobke 2020-05-04 10:02:32 +02:00 committed by GitHub
commit 6aceb39714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 77 additions and 73 deletions

View File

@ -52,14 +52,18 @@ OC.Settings = _.extend(OC.Settings, {
var groups = $(element).val();
var selection;
if (groups && results.length > 0) {
selection = _.map((groups || []).split('|').sort(), function(groupId) {
selection = _.map(_.filter((groups || []).split('|').sort(), function(groupId) {
return results.find(function(group) {
return group.id === groupId
}) !== undefined
}), function(groupId) {
return {
id: groupId,
displayname: results.find(function(group) {
return group.id === groupId;
return group.id === groupId
}).displayname
};
});
}
})
} else if (groups) {
selection = _.map((groups || []).split('|').sort(), function(groupId) {
return {