2013-08-17 05:16:48 -04:00
|
|
|
<?php
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2018-02-26 09:32:17 -05:00
|
|
|
declare(strict_types=1);
|
2013-08-17 05:16:48 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2013-08-17 05:16:48 -04:00
|
|
|
*/
|
2016-04-22 09:28:48 -04:00
|
|
|
namespace OC\AppFramework\Middleware\Security\Exceptions;
|
2015-02-26 05:37:37 -05:00
|
|
|
|
2015-11-28 05:06:46 -05:00
|
|
|
use OCP\AppFramework\Http;
|
2013-08-17 05:16:48 -04:00
|
|
|
|
|
|
|
|
/**
|
2015-11-28 05:06:46 -05:00
|
|
|
* Class NotAdminException is thrown when a resource has been requested by a
|
|
|
|
|
* non-admin user that is not accessible to non-admin users.
|
|
|
|
|
*
|
2016-04-22 09:28:48 -04:00
|
|
|
* @package OC\AppFramework\Middleware\Security\Exceptions
|
2013-08-17 05:16:48 -04:00
|
|
|
*/
|
2015-11-28 05:06:46 -05:00
|
|
|
class NotAdminException extends SecurityException {
|
2018-02-26 09:32:17 -05:00
|
|
|
public function __construct(string $message) {
|
2016-12-08 10:23:49 -05:00
|
|
|
parent::__construct($message, Http::STATUS_FORBIDDEN);
|
2013-08-17 05:16:48 -04:00
|
|
|
}
|
|
|
|
|
}
|