aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/accessibility/forms.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/accessibility/forms.php')
-rw-r--r--app/controllers/accessibility/forms.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/controllers/accessibility/forms.php b/app/controllers/accessibility/forms.php
index f4f9adf..e240a6c 100644
--- a/app/controllers/accessibility/forms.php
+++ b/app/controllers/accessibility/forms.php
@@ -3,6 +3,21 @@ class Accessibility_FormsController extends StudipController
{
protected $with_session = true;
+ public function before_filter(&$action, &$args)
+ {
+ parent::before_filter($action, $args);
+
+ if (
+ Config::get()->REPORT_BARRIER_MODE === 'off'
+ || (
+ Config::get()->REPORT_BARRIER_MODE === 'logged-in'
+ && !User::findCurrent()
+ )
+ ) {
+ throw new AccessDeniedException();
+ }
+ }
+
public function report_barrier_action()
{
PageLayout::setTitle(_('Barriere melden'));
@@ -131,6 +146,9 @@ class Accessibility_FormsController extends StudipController
}
$this->form->addPart($personal_data_part);
+
+ $this->form->addPart(new \Studip\Forms\Captcha());
+
$this->form->setSaveButtonText(_('Barriere melden'));
$this->form->setSaveButtonName('report');
$this->form->setURL($this->report_barrierURL());