diff --git a/docs/references/account/update-email.md b/docs/references/account/update-email.md index 7be36b7cdf..110ca8ee48 100644 --- a/docs/references/account/update-email.md +++ b/docs/references/account/update-email.md @@ -1,2 +1,2 @@ -Update currently logged in user account email address. After changing user address, user confirmation status is being reset and a new confirmation mail is sent. For security measures, user password is required to complete this request. -This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. \ No newline at end of file +Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request. +This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password. diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 6a9f62cc4c..4f561de342 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -22,6 +22,7 @@ use Appwrite\Utopia\Response\Model\ErrorDev; use Appwrite\Utopia\Response\Model\Execution; use Appwrite\Utopia\Response\Model\File; use Appwrite\Utopia\Response\Model\Func; +use Appwrite\Utopia\Response\Model\FuncPermissions; use Appwrite\Utopia\Response\Model\JWT; use Appwrite\Utopia\Response\Model\Key; use Appwrite\Utopia\Response\Model\Language; @@ -106,6 +107,7 @@ class Response extends SwooleResponse const MODEL_TAG_LIST = 'tagList'; const MODEL_EXECUTION = 'execution'; const MODEL_EXECUTION_LIST = 'executionList'; + const MODEL_FUNC_PERMISSIONS = 'funcPermissions'; // Project const MODEL_PROJECT = 'project'; @@ -186,6 +188,7 @@ class Response extends SwooleResponse ->setModel(new Team()) ->setModel(new Membership()) ->setModel(new Func()) + ->setModel(new FuncPermissions()) ->setModel(new Tag()) ->setModel(new Execution()) ->setModel(new Project()) diff --git a/src/Appwrite/Utopia/Response/Model/Func.php b/src/Appwrite/Utopia/Response/Model/Func.php index cb869a6b5f..1ea91757c3 100644 --- a/src/Appwrite/Utopia/Response/Model/Func.php +++ b/src/Appwrite/Utopia/Response/Model/Func.php @@ -17,7 +17,7 @@ class Func extends Model 'example' => '5e5ea5c16897e', ]) ->addRule('$permissions', [ - 'type' => Response::MODEL_PERMISSIONS, + 'type' => Response::MODEL_FUNC_PERMISSIONS, 'description' => 'Function permissions.', 'default' => new \stdClass, 'example' => new \stdClass, diff --git a/src/Appwrite/Utopia/Response/Model/FuncPermissions.php b/src/Appwrite/Utopia/Response/Model/FuncPermissions.php new file mode 100644 index 0000000000..22ee62b759 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/FuncPermissions.php @@ -0,0 +1,42 @@ +addRule('execute', [ + 'type' => self::TYPE_STRING, + 'description' => 'Execution permissions.', + 'default' => [], + 'example' => 'user:5e5ea5c16897e', + 'array' => true, + ]) + ; + } + + /** + * Get Name + * + * @return string + */ + public function getName():string + { + return 'FuncPermissions'; + } + + /** + * Get Collection + * + * @return string + */ + public function getType():string + { + return Response::MODEL_FUNC_PERMISSIONS; + } +}