feat(mail(js)): new button to expand recipients that are LDAP groups

This commit is contained in:
Francis Lachapelle committed 2019-11-21 21:51:27 -05:00
1 parent f140bba03a
commit 456a66b66b
8 files changed
+81 -22

No files matched your search

@@ -254,7 +254,7 @@
if (this.members)
return Card.$q.when(this.members);
if (this.isgroup) {
if (this.$isGroup({expandable: true})) {
return Card.$$resource.fetch(this.$path(), 'members').then(function(data) {
_this.members = _.map(data.members, function(member) {
return new Card(member);
@@ -262,6 +262,8 @@
return _this.members;
});
}
return Card.$q.reject("Card " + this.id + " is not an LDAP group");
};
/**
@@ -429,6 +431,11 @@
return this.c_component == 'vlist' && condition;
};
Card.prototype.$isGroup = function(options) {
var condition = (!options || !options.expandable || options.expandable && Card.$Preferences.defaults.SOGoLDAPGroupExpansionEnabled);
return this.isgroup && condition;
};
Card.prototype.$addOrg = function(org) {
if (angular.isUndefined(this.orgs)) {
this.orgs = [org];