DMXzone Security Provider PHP Support Product Page

Solved

Show region with more permission level (app)

Reported 12 Feb 2018 11:59:39
1
has this problem
12 Feb 2018 11:59:39 Michele - posted:
Hello,
I've an App with a login system and I need to apply a multiple roles to allow to view a section.

I've tried with this code but not works:
<div id="conditional1" is="dmx-if" dmx-bind:condition="serverconnect1.data.query1[0].role_login == 'admin','editor'">content</div>

In the above example I'd like to allow to view the section only for those users that login with role "admin" and "editor".

Is it possible?
Thanks.

Replies

Replied 12 Feb 2018 12:47:15
12 Feb 2018 12:47:15 Teodor Kuduschiev replied:
Hello Michele,
The expression syntax is wrong. It should be:


serverconnect1.data.query1[0].role_login == 'admin' || serverconnect1.data.query1[0].role_login == 'editor'"

Replied 12 Feb 2018 13:03:54
12 Feb 2018 13:03:54 Michele - replied:
Thanks Teodor!

Reply to this topic