The functionality of the watch as a "guest/user/other" how to implement?

Good time of day. Colleagues please tell me how to implement such functionality?

The project went on Yii 1, RBAC. Want to do Tul-admin bar on the website, not in the admin area and make part of the functionality to edit directly on the website. The content I dynamic are the users and customers and partners. And accordingly the content for all the different shows in different ways.

Want to browse the pages as a certain role, but while remaining with administrator privileges. How to implement such functionality?
July 9th 19 at 13:45
2 answers
July 9th 19 at 13:47
Here's a great module, but it is in yii2
Yes, I also use them when you write the project from scratch. Very comfortable, but the very concept of Yii2 easier, there is not only the role, but rules are configured. But I'm still looking for some simple solution. VK the same as implemented ) I Have a crutch. To make the abstraction from a session variable and content to issue it. but it is a crutch =) - heber_Prohas commented on July 9th 19 at 13:50
: So the same functionality in yii2 out of the box - Henderson_Beat commented on July 9th 19 at 13:53
: I have listed from the second and the fact that this is not the first, though he otherwise made ) - heber_Prohas commented on July 9th 19 at 13:56
July 9th 19 at 13:49
It all depends on a number of factors.
which template basiс or anvanced, not under domain, if the admin panel? How we implemented RBAC standard methods yii or extension of someone?
If it and another to ignore, then You need to write to session variable, for example type_view and change the appearance of it. But as it depends on Your structure. There are different Views for different roles or units are hiding.
yii1 - had templates.
Admin module is done.
RBAC standard

I could see the same solution with the sessions. But in fact, the architecture is divided and available for the admin, but in places mates i.e. where both of you need to watch. or to write a view specifically for pdmin, or be a crutch through the server session. - heber_Prohas commented on July 9th 19 at 13:52
: A layout for the admin private does not solve the problem? - Henderson_Beat commented on July 9th 19 at 13:55
: decide by itself, I just wanted to solve in one place, which would in other not to govern, but probably will have to cut certain types and show you what you need. - heber_Prohas commented on July 9th 19 at 13:58
: layout, not the view - so in the 1st place. Or not? If You have a lot, make a block in the view insert. - heber_Prohas commented on July 9th 19 at 14:01
: did so, if for some time is not predlogaet something else, I note the decision. - Henderson_Beat commented on July 9th 19 at 14:04

Find more questions by tags ProgrammingWeb DevelopmentYii