This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
throw exception if related collection cannot be accessed
Fixes #667
- Loading branch information
1 parent
1f7e8e7
commit d5edccb
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/core/Directus/Database/Exception/ForbiddenFieldAccessException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Directus\Database\Exception; | ||
|
||
use Directus\Exception\ForbiddenException; | ||
|
||
class ForbiddenFieldAccessException extends ForbiddenException | ||
{ | ||
const ERROR_CODE = 215; | ||
|
||
public function __construct($field) | ||
{ | ||
$message = sprintf('Unable to access "%s" related data', $field); | ||
|
||
parent::__construct($message); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters