4 * AccessDeniedException represents a system exception that access was denied due to a ACL Violation
6 * @link http://www.open-emr.org
7 * @author Stephen Nielson <stephen@nielson.org>
8 * @copyright Copyright (c) 2020 Stephen Nielson <stephen@nielson.org>
9 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
12 namespace OpenEMR\Common\Acl
;
16 class AccessDeniedException
extends \Exception
21 private $requiredSection;
28 public function __construct(string $requiredSection, $subCategory = '', $message = "", $code = 0, Throwable
$previous = null)
30 $this->requiredSection
= $requiredSection;
31 $this->subCategory
= $subCategory;
32 if (empty($message)) {
33 $message = xlt('ACL check failed');
35 parent
::__construct($message, $code, $previous);
41 public function getRequiredSection(): string
43 return $this->requiredSection
;
49 public function getSubCategory(): string
51 return $this->subCategory
;