AdminIpNotAllowedException.php 665 B

1234567891011121314151617181920212223
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OC\AppFramework\Middleware\Security\Exceptions;
  8. use OCP\AppFramework\Http;
  9. /**
  10. * Class AdminIpNotAllowed is thrown when a resource has been requested by a
  11. * an admin user connecting from an unauthorized IP address
  12. * See configuration `allowed_admin_ranges`
  13. *
  14. * @package OC\AppFramework\Middleware\Security\Exceptions
  15. */
  16. class AdminIpNotAllowedException extends SecurityException {
  17. public function __construct(string $message) {
  18. parent::__construct($message, Http::STATUS_FORBIDDEN);
  19. }
  20. }