Developer forum

Forum » CMS - Standard features » Blank pages shown when logged in user has no permission

Blank pages shown when logged in user has no permission

Jon Thorne
Jon Thorne
Reply

Hi,

I have a few pages that are available to some users but not others. When the user logs in I can choose to redirect them to a page that they have access to. But there are 2 issues that I have with this.

1. When a user logs in with external authentication they are not redirected to their own default start page - but to the default start page.

2. When a logged in user opens a url that they have no access to they just get a blank content page (with menu and footer).

The best thing to fix this issue would be for any page that a logged in user has no permission to can be redirected to another page, or their own start page would be even better. What would be the easiest way to do this?

Regards, Jon.


Replies

 
Nicolai Pedersen
Reply

Hi Jon

On page properties, advanced tab, login template button, you can set what should happen with pages in the navigation that the user does not have access to - display it in the navigation or hide it. That should avoid users to see pages they should not.

If the user access the page regardless, you can use PageView.IsCurrentUserPermissionAllowed to see if the user has access and handle that somehow - redirect to login page.

If you are not using visual content builder with grids, you can show a login template in the content area on pages where the user does not have access using the login template option on page properties.

I will ask QA to look into you #1.

 
Jon Thorne
Jon Thorne
Reply

Hi Nicolai,

As I mentioned in my description, the user is already logged in. There is no point redirecting them to the login page. Different users have access to different pages after they login.

Regards, Jon.

 
Shiwanka Chathuranga Dynamicweb Employee
Shiwanka Chathuranga
Reply

@john hope your using version 9.8 or up

according to your questionn it seems issue on website permissionds and page level permissions configuration, double check this one first.

you can achive common login page and redirection base on permission wise by creating custom login redirection provider in front end, from that you can do what ever you want

 
Jon Thorne
Jon Thorne
Reply

Hi Shiwanka,

Yes, we are on 9.8.9 at the moment. Permissions are set correctly, so the user can only view the page they are allowed. One example of this is the impersonation page. I have only employees enabled to be able to view the impersonation page, but customers do not have access to this. But when I use the impersonation page to login as a customer the page refreshes once the customer logs in and then as they do not have read access the page is blank. This is made a little more complicated as we are also forcing everyone to login using external authentication to enforce 2FA, as this is not available in DW.

It looks like I will have to use a custom login redirection provider to manage this as you have mentioned. Thanks for the help, good to hear from you again.

Regards, Jon.

 
Shiwanka Chathuranga Dynamicweb Employee
Shiwanka Chathuranga
Reply

2FA is farly simple implementation if you use External authentication provider. https://doc.dynamicweb.com/documentation-9/users/external-authentication/external-authentication

if you use external provider like Azure AD, it just configuration only for both front end and backend.

 

 
Jon Thorne
Jon Thorne
Reply

Thanks Shiwanka. Yes, that was my point, we are already using external authentication. That is why the normal default login redirect per user does not work any more. It works ok if we do not use external Authentication, but does not redirect correctly when users login with external authentication.

If you have any helpful comments about using external authentication for the backend login perhaps you can add to this thread: https://doc.dynamicweb.com/forum/cms-standard-features/cms-standard-features/azure-ad-sso-backend-login-error

I still can't seem to get this to work at all. So any advise would be appreciated. And, yes, I have followed and double checked all the instructions.

Regards, Jon.

 

 
Shiwanka Chathuranga Dynamicweb Employee
Shiwanka Chathuranga
Reply

configure all your frontend logins to redirect to one frontend uril, something like /loginsucess

inside of this page template write your all custom codes, you can use user custom value or group custom value to handle this

as example :- if you have B2B users that has to go to Page1  and B2C users that has to goto Page2 likewise

 

hope this is more clear

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi,

TFS 87292 has been submitted to implement redirect to own start page (defined in user group the user belongs to) for user logs with external authentication (against the point 1 above). Thanks.

BR, Oleg QA

 
Jon Thorne
Jon Thorne
Reply

Hi Oleg,

Thanks. That will be very helpful.

Regards, Jon.

 

You must be logged in to post in the forum