Fix error when updating installation with useMasterKey (#2888)
* Add failing test for updating installations with masterKey * Prevent auth.installationId from being used when using masterKey This allows masterKey to update any installation object Fixes ParsePlatform/parse-server##2887
This commit is contained in:
committed by
Florent Vilmart
parent
305b037176
commit
a6a6f7ff60
@@ -578,8 +578,12 @@ RestWrite.prototype.handleInstallation = function() {
|
||||
this.data.installationId = this.data.installationId.toLowerCase();
|
||||
}
|
||||
|
||||
// If data.installationId is not set, we can lookup in the auth
|
||||
let installationId = this.data.installationId || this.auth.installationId;
|
||||
let installationId = this.data.installationId;
|
||||
|
||||
// If data.installationId is not set and we're not master, we can lookup in auth
|
||||
if (!installationId && !this.auth.isMaster) {
|
||||
installationId = this.auth.installationId;
|
||||
}
|
||||
|
||||
if (installationId) {
|
||||
installationId = installationId.toLowerCase();
|
||||
|
||||
Reference in New Issue
Block a user