Gestion de l'affichage de "settings" uniquement si on est "admin"
This commit is contained in:
parent
3bb6c0802b
commit
4211fb9160
4
view.php
4
view.php
|
@ -98,11 +98,15 @@
|
||||||
<span data-link='analytics' ><?= ResourceDispatcher::getResource('f/svg/analytics/st/menu-side'); ?>Statistiques</span>
|
<span data-link='analytics' ><?= ResourceDispatcher::getResource('f/svg/analytics/st/menu-side'); ?>Statistiques</span>
|
||||||
<span data-link='charts' class='sep'><?= ResourceDispatcher::getResource('f/svg/charts/st/menu-side'); ?>Visualisation</span>
|
<span data-link='charts' class='sep'><?= ResourceDispatcher::getResource('f/svg/charts/st/menu-side'); ?>Visualisation</span>
|
||||||
|
|
||||||
|
<?php if( permission('admin') ){ ?>
|
||||||
|
|
||||||
<span data-link='settings' ><?= ResourceDispatcher::getResource('f/svg/settings/st/menu-side' ); ?>Paramètres</span>
|
<span data-link='settings' ><?= ResourceDispatcher::getResource('f/svg/settings/st/menu-side' ); ?>Paramètres</span>
|
||||||
<div class='sub'>
|
<div class='sub'>
|
||||||
<span data-sublink='tokens'>Gestion des tokens</span>
|
<span data-sublink='tokens'>Gestion des tokens</span>
|
||||||
<span data-sublink='users'>Gestion des utilisateurs</span>
|
<span data-sublink='users'>Gestion des utilisateurs</span>
|
||||||
</div>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,15 +8,21 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* [1] On recupere les tokens
|
|
||||||
|
/* [1] Gestion des tokens
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
|
// permission: admin
|
||||||
|
//=======================================================//
|
||||||
|
|
||||||
|
/* (1) On recupere la liste des tokens */
|
||||||
$req_tokens = new Repo('token/getAll');
|
$req_tokens = new Repo('token/getAll');
|
||||||
$tokens = $req_tokens->answer();
|
$tokens = $req_tokens->answer();
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
/* (2) Gestion des droits */
|
||||||
|
if( permission('admin') ){ ?>
|
||||||
|
|
||||||
<section data-sublink='tokens'>
|
<section data-sublink='tokens'>
|
||||||
|
|
||||||
<h6 class='center'>Gestion des accès distants</h6><br>
|
<h6 class='center'>Gestion des accès distants</h6><br>
|
||||||
|
|
||||||
|
@ -67,7 +73,9 @@ $tokens = $req_tokens->answer();
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<section data-sublink='users'>
|
<section data-sublink='users'>
|
||||||
Gestion des utilisateurs
|
Gestion des utilisateurs
|
||||||
|
|
Loading…
Reference in New Issue