Skip to content

Commit 12393a8

Browse files
committed
12
1 parent c9b36b9 commit 12393a8

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

OpenFlow/src/DatabaseConnection.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ export class DatabaseConnection {
104104
{
105105
var ace = item.members[i];
106106
if (Config.update_acl_based_on_groups == true) {
107-
item.addRight(ace._id, ace.name, [Rights.read]);
107+
if (multi_tenant_skip.indexOf(item._id) > -1) {
108+
item.removeRight(ace._id, [Rights.read]);
109+
} else {
110+
item.addRight(ace._id, ace.name, [Rights.read]);
111+
}
108112
}
109113
var exists = item.members.filter(x => x._id == ace._id);
110114
if (exists.length > 1) {
@@ -153,7 +157,12 @@ export class DatabaseConnection {
153157
if (Config.update_acl_based_on_groups) {
154158
for (var i = removed.length - 1; i >= 0; i--) {
155159
var ace = removed[i];
156-
item.removeRight(ace._id, [Rights.read]);
160+
161+
if (multi_tenant_skip.indexOf(item._id) > -1) {
162+
item.removeRight(ace._id, [Rights.read]);
163+
} else {
164+
item.removeRight(ace._id, [Rights.read]);
165+
}
157166
var arr = await this.db.collection("users").find({ _id: ace._id }).project({ name: 1, _acl: 1, _type: 1 }).limit(1).toArray();
158167
if (arr.length == 1 && item._id != WellknownIds.admins && item._id != WellknownIds.root) {
159168
if (Config.multi_tenant && multi_tenant_skip.indexOf(item._id) > -1) {

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.412
1+
0.0.413

0 commit comments

Comments
 (0)