Skip to content

Commit

Permalink
Merge pull request #81 from philippebeck/dev
Browse files Browse the repository at this point in the history
Release 4.2.1
  • Loading branch information
philippebeck authored Jun 20, 2020
2 parents f6645c6 + 589a4e7 commit 391df03
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "philippebeck/pam",
"version": "4.2.0",
"version": "4.2.1",
"type": "library",
"description": "Php Approachable Microframework",
"keywords": [
Expand Down
9 changes: 5 additions & 4 deletions core/Controller/Service/SecurityManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace Pam\Controller\Service;

use Pam\Controller\MainController;
use Pam\Controller\GlobalsController;
use ReCaptcha\ReCaptcha;

/**
* Class SecurityManager
* @package Pam\Controller\Service
*/
class SecurityManager extends MainController
class SecurityManager extends GlobalsController
{
/**
* @param string $response
Expand All @@ -26,7 +26,7 @@ public function checkRecaptcha(string $response)
return $result->isSuccess();
}

public function checkAdminAccess()
public function checkIsAdmin()
{
$session = $this->getSession()->getSessionArray();
$isAdmin = false;
Expand All @@ -50,7 +50,8 @@ public function checkAdminAccess()
if ($isAdmin === false) {
$this->getSession()->createAlert("You must be logged in as Admin to access to the administration", "black");

$this->redirect("home");
}

return $isAdmin;
}
}

0 comments on commit 391df03

Please sign in to comment.