Need some conditional for checking User Role and Logged In Status

I have knack app embedded in our website. Trying to learn how to check user role and logged in status, and use a conditional to show a specific nav bar based on that.

I am trying to build some solution to do the following however I am not really a JS programmer. Any help is greatly appreciated.

if user is logged in AND has user role(s) = Admin {
then do something
} else if user is logged in AND has user role(s) = Manager OR Team Lead OR Support {
then do something different
} else is user is logged in AND has user role(s) = Client {
then do yet again something different
} else is user if logged out {
then do this
}
endif

Hi John,

We do this quite a bit both in JS and using form rules - I'd try the latter first of course.

But if you must resort to javascript then check out the utility functions in the devbeloper docs getUserAttributes and getUserRoles here https://www.knack.com/developer-documentation/#retrieving-user-properties-utility

Brad