few fixed for Character permissions
This commit is contained in:
parent
b471efc970
commit
437353ca81
7 changed files with 17 additions and 9 deletions
|
|
@ -158,6 +158,16 @@
|
|||
// Get seminary
|
||||
$seminary = $this->Seminaries->getSeminaryByUrl($seminaryUrl);
|
||||
|
||||
// Check for already existing Character
|
||||
try {
|
||||
$this->Characters->getCharacterForUserAndSeminary($this->Auth->getUserId(), $seminary['id']);
|
||||
throw new \nre\exceptions\AccessDeniedException();
|
||||
}
|
||||
catch(\nre\exceptions\IdNotFoundException $e) {
|
||||
// The should be the case
|
||||
}
|
||||
|
||||
|
||||
// Character types
|
||||
$types = $this->Charactertypes->getCharacterTypesForSeminary($seminary['id']);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue