<?php

namespace App\Common;


class CorePermission{

    protected static function isPermittedFromSessionByControllerId($controller_id){
        $result = false;
        $access_controllers = $_SESSION['access_controller'];
        if (!empty($access_controllers)) {
            foreach ($access_controllers as $controller) {
                if ($controller['id'] == $controller_id) {
                    $result = true;
                    break;
                }
            }
        }
        return $result;
    }
}