Files
nextcloud-tables/lib/Model/Permissions.php
Andy Scherzinger 9a46561716 chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-08-08 15:35:37 +02:00

37 lines
838 B
PHP

<?php
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Tables\Model;
use JsonSerializable;
class Permissions implements JsonSerializable {
public function __construct(
public bool $read = false,
public bool $create = false,
public bool $update = false,
public bool $delete = false,
public bool $manage = false,
public bool $manageTable = false,
) {
}
/**
* @return array{read: bool, create: bool, update: bool, delete: bool, manage: bool}
*/
public function jsonSerialize(): array {
// manageTable is not serialized as it is used in the backend only
return [
'read' => $this->read,
'create' => $this->create,
'update' => $this->update,
'delete' => $this->delete,
'manage' => $this->manage,
];
}
}