Skip to main content

I have three different levels of SKUID access. 1) Internal Staff who use SKUID as both builders and viewers. 2) Community Members who use SKUID to log into a portal which consists of all SKUID pages after the login. 3) Public Users who log into the Community via Sites and have view access to SKUID without authentication. The problem I am running into is that for the second group they may abandon a page and perhaps try to refresh it later (after their session has expired). But since the public guest user has View privilages they can see the page (although the correct information is not getting loaded into the models since it depends on the logged in user.) and this is providing some unintended results. Is there a way for me to run an action based off of a non-authenticated user hitting the page (perhaps redirecting them to the login page?) Or maybe there is a better way to satisfy the three conditions but lock down the security on some of the Skuid pages.

This is a great question. Skuid?


I ended up using the following inline Javascript to redirect unauthenticated users to the logout page. Seems to be working well for the use case described. (function(skuid){ var $ = skuid.$; $(document.body).one(‘pageload’,function(){ if (!skuid.utils.userInfo.isAuthenticated) window.location.replace(“/secur/logout.jsp”); }); })(skuid);


Reply