Add master key override to live query ACL checks (#4133)
* Add master key override to live query ACL checks * Fix mockClient so masterKey tests work correctly
This commit is contained in:
committed by
Florent Vilmart
parent
52c4dd3704
commit
121d151af9
@@ -8,6 +8,7 @@ const dafaultFields = ['className', 'objectId', 'updatedAt', 'createdAt', 'ACL']
|
||||
class Client {
|
||||
id: number;
|
||||
parseWebSocket: any;
|
||||
hasMasterKey: boolean;
|
||||
userId: string;
|
||||
roles: Array<string>;
|
||||
subscriptionInfos: Object;
|
||||
@@ -20,9 +21,10 @@ class Client {
|
||||
pushDelete: Function;
|
||||
pushLeave: Function;
|
||||
|
||||
constructor(id: number, parseWebSocket: any) {
|
||||
constructor(id: number, parseWebSocket: any, hasMasterKey: boolean) {
|
||||
this.id = id;
|
||||
this.parseWebSocket = parseWebSocket;
|
||||
this.hasMasterKey = hasMasterKey;
|
||||
this.roles = [];
|
||||
this.subscriptionInfos = new Map();
|
||||
this.pushConnect = this._pushEvent('connected');
|
||||
|
||||
Reference in New Issue
Block a user