NotAdminException.php 665 B

1234567891011121314151617181920212223
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  6. * SPDX-License-Identifier: AGPL-3.0-only
  7. */
  8. namespace OC\AppFramework\Middleware\Security\Exceptions;
  9. use OCP\AppFramework\Http;
  10. /**
  11. * Class NotAdminException is thrown when a resource has been requested by a
  12. * non-admin user that is not accessible to non-admin users.
  13. *
  14. * @package OC\AppFramework\Middleware\Security\Exceptions
  15. */
  16. class NotAdminException extends SecurityException {
  17. public function __construct(string $message) {
  18. parent::__construct($message, Http::STATUS_FORBIDDEN);
  19. }
  20. }