mirror of
https://github.com/appwrite/appwrite
synced 2026-05-06 06:48:22 +00:00
47 lines
No EOL
1,002 B
PHP
47 lines
No EOL
1,002 B
PHP
<?php
|
|
|
|
namespace Appwrite\Utopia\Response\Model;
|
|
|
|
use Appwrite\Utopia\Response;
|
|
use Appwrite\Utopia\Response\Model;
|
|
|
|
class Permissions extends Model
|
|
{
|
|
public function __construct()
|
|
{
|
|
$this
|
|
->addRule('read', [
|
|
'type' => self::TYPE_STRING,
|
|
'description' => 'Read permissions.',
|
|
'example' => ['*', 'user:5e5ea5c16897e'],
|
|
'array' => true,
|
|
])
|
|
->addRule('write', [
|
|
'type' => self::TYPE_STRING,
|
|
'description' => 'Write permissions.',
|
|
'example' => ['*', 'user:5e5ea5c16897e'],
|
|
'array' => true,
|
|
])
|
|
;
|
|
}
|
|
|
|
/**
|
|
* Get Name
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getName():string
|
|
{
|
|
return 'Permissions';
|
|
}
|
|
|
|
/**
|
|
* Get Collection
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getType():string
|
|
{
|
|
return Response::MODEL_PERMISSIONS;
|
|
}
|
|
} |