Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.

[SOLVED] Guest access issues (again). Hiding menus

Jaymer

SOLVED: Just decided to duplicate the VPs. 5 mins. done

As simple as you'd think guest stuff is, there's plenty of odd questions about Guests in the forum.

In my approach, Guests are perfectly acceptable to have full access to the system - its protected by firewall so anyone who can get to it can use it without logging in.

I'm coming in via logonGuest.aw

RATHER than use a separate VP, I wanted to use my main VP as regular users. This keeps me from duplicating the menus & main content panels.
So I'd like to use the "invisible when" approach... but this isn't working.

For a content panel, I'm trying "invisible when" LoggedInRegularUser.AccessLevel = 'Guest',
but of course this doesn't work. These users aren't really logged in, and he said in a post there is no LoggedInSystemUser record.

So what is out there that I can use in a function that knows when a Guest user is in the system?
I'm thinking I may just go back to a VP for guests.


PointsWell

Jaymer wrote

For a content panel, I'm trying "invisible when" LoggedInRegularUser.AccessLevel = 'Guest',

LoggedIn prefix requires to be logged in. You are testing equality for a role that doesn't persist in the system. Instead a try negation of one that does persist.

Try invisible when LoggedInRegularUser.AccessLevel <> 'Regular User' or whatever the role is.


rocketman

Might be totally off the wall here because I’ve never allowed any kind of guest access, but can you not make the contents panel invisible in the access level settings for guest


hpl123

You can maybe do something with the session id e.g have a variable part of the login URL that link a session id with a guest "login" and then use that in filtering. Not sure how and if it would work, just throwing it out there.


BobK

May be a bug!

Jaymer, when I saw your post I thought "that should work". So I did some playing around with the Guest access.

Doing something like

If LoggedInRegularUser.AccessLevel = 'Guest' Then

in a Process works as expected.

but using

LoggedInRegularUser.AccessLevel = 'Guest'

for the "invisible when" on a menu item gives me the same result as what you experienced.

Just for an experiment, try

LoggedInRegularUser.AccessLevel <> 'Guest'

in the "invisible when"

Fun Fact:
I have a BSV that allows Guest access and I create a log entry every time some one logs in. My logs show that the LoginName for Guests is
BAS_Guest@@


Jaymer

BobK wrote

but using

LoggedInRegularUser.AccessLevel = 'Guest'

for the "invisible when" on a menu item gives me the same result as what you experienced.

not only does it not work, but if you check the Tomcat log, it throws an error (something like...) "Object RegularUser not found"

So I'm surprised it worked in your process test.
Of course, there IS NO physical "LoginName=Guest" record in RegularUser, so I'm not surprised it throws the error.
(I know you can add one for testing, but this isn't that)

The idea about setting a flag in a Login Notif would work. Esp. now with new Global Variables (use the crap outta this now!).

So, In 5 minutes, I just copy/pasted my VP and replaced the default guest VP... removed the extra stuff, and now I have my minimalist UI presentation for Guests. I'll deal with the stuff I need to duplicate and manually correct in 2 places. I spent a lot more than 5 mins trying to figure out the "elegant" way to do it. I concede!
Thx all for checking into this.


Jaymer

oh, PS:

This looks ugly in the URL:

https://tech1.med.com/apps/logonGuest.aw?domain=market1#/home

Screen Shot 2022-02-10 at 10.50.37 AM.png

We're used to this for limited users inside a company, but public facing doesn't look nice.