Skip to content

Commit

Permalink
Fixing link/login issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel Stohn authored and Axel Stohn committed Jun 5, 2023
1 parent f327b02 commit 8687172
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Controller/GrouperGroupsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,13 @@ public function beforeFilter()
{
parent::beforeFilter();

if($this->Session->read('Auth.User.username') !== null || $this->Session->read('Auth.User.username') == ''){
$this->Auth->unauthorizedRedirect = "/";
// Perform a bit of a sanity check before we get any further
try {
$this->verifyRequestedId();
}
catch(InvalidArgumentException $e) {
$this->Flash->set('You are currently not logged into COmanage, please log in.', array('key' => 'error'));
$this->redirect("/");
}

$this->Security->unlockedActions = array('removeSubscriber', 'addSubscriber');
Expand Down

0 comments on commit 8687172

Please sign in to comment.