D
D
del9937882016-12-31 15:06:42
Yii
del993788, 2016-12-31 15:06:42

How can I display my blocks for the admin?

Hello. I installed rbac and it advises to use:
'items' => Helper::filter($menuItems) in order to display its own navigation for each role.
If the moderator does not have permission to view a particular link, it will not be displayed in his navigation.
I'm not satisfied with the default navigation and I made my own. However, I can't make a separate navigation view for the administrator and for the moderator. How to implement this code in the view:
<?php if(If you are an administrator): ?>
This text is visible only to the administrator
<?php endif;?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2016-12-31
@slo_nik

Good afternoon.
Never implement.
Make separate controllers and views for users and administrators.
Close access at the controller level.
More details here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question