Skip to content

Commit

Permalink
min age fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-stanek committed Nov 9, 2024
1 parent db6b25d commit 2ecd818
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/AdminModule/Forms/EditRoleFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public function processForm(Form $form, stdClass $values): void
$this->role->setRegisterableTo($values->registerableTo);
$this->role->setCapacity($capacity);
$this->role->setApprovedAfterRegistration($values->approvedAfterRegistration);
$this->role->setMinimumAge($values->minimumAge);
$this->role->setMinimumAge((int) $values->minimumAge);
$this->role->setPermissions($this->permissionRepository->findPermissionsByIds($values->permissions));
$this->role->setPages($this->pageRepository->findPagesBySlugs($values->pages));
$this->role->setRedirectAfterLogin($values->redirectAfterLogin);
Expand Down
4 changes: 4 additions & 0 deletions app/WebModule/Components/ApplicationsGridControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ public function createComponentApplicationsGrid(string $name): void
$presenter = $this->getPresenter();
assert($presenter instanceof WebBasePresenter);

if (! $presenter->getUser()->isLoggedIn()) {
return;
}

$this->user = $presenter->getDbUser();

$explicitSubeventsExists = $this->subeventRepository->explicitSubeventsExists();
Expand Down

0 comments on commit 2ecd818

Please sign in to comment.