removed deprecated registry and use session
This commit is contained in:
parent
3dd6217133
commit
757a82c26f
2 changed files with 2 additions and 6 deletions
|
|
@ -86,10 +86,10 @@ class BuildController extends \PHPCI\Controller
|
|||
*/
|
||||
public function delete($buildId)
|
||||
{
|
||||
if (!Registry::getInstance()->get('user')->getIsAdmin()) {
|
||||
if (empty($_SESSION['user']) || !$_SESSION['user']->getIsAdmin()) {
|
||||
throw new \Exception('You do not have permission to do that.');
|
||||
}
|
||||
|
||||
|
||||
$build = $this->_buildStore->getById($buildId);
|
||||
$this->_buildStore->delete($build);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue