File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) {
Original file line number Diff line number Diff line change 1- 0.0.412
1+ 0.0.413
You can’t perform that action at this time.
0 commit comments