Skip to content

Commit c9b36b9

Browse files
committed
more rights
1 parent 22c0624 commit c9b36b9

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

OpenFlow/src/DatabaseConnection.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ export class DatabaseConnection {
103103
for (var i = item.members.length - 1; i >= 0; i--) {
104104
{
105105
var ace = item.members[i];
106+
if (Config.update_acl_based_on_groups == true) {
107+
item.addRight(ace._id, ace.name, [Rights.read]);
108+
}
106109
var exists = item.members.filter(x => x._id == ace._id);
107110
if (exists.length > 1) {
108111
item.members.splice(i, 1);
@@ -150,6 +153,7 @@ export class DatabaseConnection {
150153
if (Config.update_acl_based_on_groups) {
151154
for (var i = removed.length - 1; i >= 0; i--) {
152155
var ace = removed[i];
156+
item.removeRight(ace._id, [Rights.read]);
153157
var arr = await this.db.collection("users").find({ _id: ace._id }).project({ name: 1, _acl: 1, _type: 1 }).limit(1).toArray();
154158
if (arr.length == 1 && item._id != WellknownIds.admins && item._id != WellknownIds.root) {
155159
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.411
1+
0.0.412

0 commit comments

Comments
 (0)