Is this possible with security manager

What I want to do is have a login page:
If a user with a member logs in then I want to goto Page A
If a user with Admin logs in then I want to goto Page B

Is this possible with security manager, is there a walk through on how to do this. ?

In one word - yes, it’s possible.

You can dynamically redirect users with the brwoser go to action, then just read the user details immediately after login step, using a database query which you filter by the returned ID of the user.

In the browser go to you then do this:

dmx-on:success="browser1.goto([0].user_role == 'admin' ? 'page1.html' : 'page2.html')"

where[0].user_role is the query result, filtered by the logged user ID.

1 Like

Another alternative is that they direct to the same page but content is hidden, using conditional regions, from those without access. just in case there’s links to other pages that the non-admin person shouldn’t have access to (that they could find by inspecting the source), use the Security Provider Enforcer
(App properties) to set the permissions for that page to the roles you set up (which could include ‘Admin’)

1 Like

p.s. the permissions are set for the Security Provider Enforcer in Server Connect:

Here’s a tutorial how to do this:

1 Like