public function needAuthenticate()
 {
     if (!$this->EmployeeAuthentication->authenticated()) {
         header('Location: /admin/modules/employees/authorization');
         exit;
     }
 }
Beispiel #2
0
    public function currentRender()
    {
        ?>
        <nav class="navbar navbar-inverse navbar-static-top">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-navbar-collapse" aria-expanded="false">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" target="_blank" href="/" title="Просмотреть пользовательскую часть сайта"><span class="glyphicon glyphicon-eye-open"></span></a>
                    &nbsp;&nbsp;
                    <a class="navbar-brand" href="/<?php 
        echo $this->pathRoot;
        ?>
"><?php 
        echo $this->projectName;
        ?>
</a>
                </div>

                <div class="collapse navbar-collapse" id="bs-navbar-collapse">
                    <?php 
        $this->itemsList->render();
        ?>
                    <ul class="nav navbar-nav navbar-right">
                        <li>
                            <a href="/admin/modules/employees/authorization/unauthorize">Выход</a>
                        </li>
                    </ul>
                    <p class="navbar-text navbar-right" style="color: #ffffff; font-weight: 600;"><span class="glyphicon glyphicon-user"></span>&nbsp;<?php 
        echo $this->Authentication->getCurrentUser()->name;
        ?>
</p>
                </div>
            </div>
        </nav>
    <?php 
    }
Beispiel #3
0
 public function authenticated()
 {
     return $this->EmployeeAuthentication->authenticated();
 }