A
A
Anton Natarov2016-05-16 14:28:16
Yii
Anton Natarov, 2016-05-16 14:28:16

Functionality to look like "guest / user / other" how to implement?

Good day. Colleagues, please tell me how to implement such functionality?
The project got on Yii 1, with RBAC. I want to make an admin toolbar on the site, and not in the admin panel, and make part of the editing functionality right on the site. At the same time, my content is dynamic and there are users, but there are clients and partners. And accordingly, the content is different for everyone, it is shown in different ways.
I want to implement browsing as a specific role, but at the same time remaining with administrator rights. How to implement such functionality?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
Julia Kovalenko, 2016-05-16
@kovalenko_jul_s

Here is a great module, but it's on yii2 https://github.com/developeruz/yii2-db-rbac

M
Maxim Timofeev, 2016-05-16
@webinar

It all depends on a number of factors.
which template is basic or anvanced, is the admin panel on a subdomain? How is RBAC implemented using standard yii methods or someone's extension?
If you abstract from this and the other, then you need to write a variable to the session, for example type_view and change the view from it. And how it already depends on your structure. Views there are different for different roles or blocks are hidden.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question