From 5ff28c6084e77ae6d3c31e7bfdcbdb732512aaf8 Mon Sep 17 00:00:00 2001 From: Niko Diamadis Date: Sun, 26 Jun 2022 13:01:56 +0200 Subject: [PATCH 1/3] Add master key note in Setup section --- _includes/php/setup.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/_includes/php/setup.md b/_includes/php/setup.md index 4d7cbe667..170640ffe 100644 --- a/_includes/php/setup.md +++ b/_includes/php/setup.md @@ -16,6 +16,12 @@ If your server does not use or require a REST key you may initialize the ParseCl ParseClient::initialize( $app_id, null, $master_key ); ``` +**Note**: + +The master key is **NOT** used by default for requests. You have to explicitly specify that a request is allowed to use the master key. + +For more information see [Using Master Key](#using-master-key). + ## Server URL Directly after initializing the sdk you should set the server url. From ac41d999623ba70953b8229c5422a22e1c025bce Mon Sep 17 00:00:00 2001 From: Niko Diamadis Date: Sun, 26 Jun 2022 16:14:25 +0200 Subject: [PATCH 2/3] Add information directly in setup section --- _includes/php/setup.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_includes/php/setup.md b/_includes/php/setup.md index 170640ffe..715638310 100644 --- a/_includes/php/setup.md +++ b/_includes/php/setup.md @@ -16,11 +16,11 @@ If your server does not use or require a REST key you may initialize the ParseCl ParseClient::initialize( $app_id, null, $master_key ); ``` -**Note**: +### Using Master Key -The master key is **NOT** used by default for requests. You have to explicitly specify that a request is allowed to use the master key. +Even though you specify the master key for intialization the master key is **NOT** used by default for requests. You have to explicitly specify that a request is allowed to use the master key. -For more information see [Using Master Key](#using-master-key). +Therefore you can often pass a boolean when calling methods like `get`, `count` and `find`. Find details about method parameters in the [PHP SDK repo](https://github.com/parse-community/parse-php-sdk/blob/master/src/Parse/ParseQuery.php). ## Server URL From 09dd282e1e19bcdbf22f3e9ede8a754427f9c6b0 Mon Sep 17 00:00:00 2001 From: Niko Diamadis Date: Wed, 29 Jun 2022 09:05:23 +0200 Subject: [PATCH 3/3] Give example for optional useMasterKey parameter --- _includes/php/setup.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_includes/php/setup.md b/_includes/php/setup.md index 715638310..77736e904 100644 --- a/_includes/php/setup.md +++ b/_includes/php/setup.md @@ -22,6 +22,8 @@ Even though you specify the master key for intialization the master key is **NOT Therefore you can often pass a boolean when calling methods like `get`, `count` and `find`. Find details about method parameters in the [PHP SDK repo](https://github.com/parse-community/parse-php-sdk/blob/master/src/Parse/ParseQuery.php). +**Example**: `public function get($objectId, $useMasterKey = false)` + ## Server URL Directly after initializing the sdk you should set the server url.