Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Display different Iframe for Guest and for Registered users
Hi all,
What I want to achieve:
- display one iframe for guest users only
- on the same page display another iframe for logged in users only
Sounds easy, but it's not. The problem is, even if I check the permission for the first iframe to be visible only for guests, it displays also for logged in users. I guess this is because the logged in users inherits permissions from guest users.
I found one workaround for the permissions, simply
put permissions.check.guest.enabled=false
inside portal-ext.properties
. Everything is working fine,
the iframes are displaying as intended, but here comes the funny part.
Now my logged in user can't log out, since he don't have permissions
for that. Now I tried for 2 days different combination of permissions
to display the user bar on the top and the user menu on the left to
enable for users to log out without success. At this point I'm really
frustrated, that I can't set up a primitive scenario like this in liferay.
Yea, you're right, the users will inherit permissions from guest. I've seen this question asked before in the forums, but can't find it now.
Is your iframe in a web content? The simplest way is probably to create a web content template which shows different content if the user is signed in or not.
Powered by Liferay™