Function to verify if a user is logged in

By Gonçalo Almeida on 27 Jan 2011
Hi all,

It would be very usefull to have a built-in function that returns a boolean indicating if the platform considers a user to be logged in.

Details:

Function IsUserLoggedIn (UserId): boolean
Rebecca Hall31 Jan 2011
I noticed an issue to where the top of the screen said the person was Person A, but then when they tried to do something it said they were Person B and couldn't.  It would also be good to verify that the person is who they say they are and not just logged in.
Laurentiu LAZAR1 Feb 2011
Hi,
And also a complementary function to retrieve the logged user role.
Hi Laurentiu,

I believe that Enterprise Manager already has a public action that retrieves a user role.
Laurentiu LAZAR2 Feb 2011
Hi to all,

Sorry if I'm dumb but I'm very new to all this software. So I miss much information about it.
When I mean to a function to retrieve roles, I think to the Service Studio that is relevant for me, and special to USER_MASTER entity that I suppose to be the application user entity.
Yoy know, I have an User entity, and let supose in the application scenrio, for example some users are admins, others are sales representattives, other are I don't know, brand managers, other are region managers and so on.
So I have ro retrieve various information filtered by user ID (e.g. each sales representative see only his orders), and also I need role information for logged in user for allowing to acces or not some pages (eg. sales represenatives have not to acces I don't know the entry order page; this is accesed for example by shops, but have to acces order reports).
This is scenario that I have in mind.
Rebecca Hall2 Feb 2011
We have ran across simliar security issues since we have sensitive data that can't be exposed to all users.  Our solution is to setup a group - role architecture and connecting it to our Active Directory groups.  Then we create a view on SQL Server based on an entity (Imported through Integration Studio) and user so that we can apply the filter when a user accesses the page to filter out the data he can't see.
I don't know if this idea was completly understood.
I'm just asking for a built-in function that allows us to check if a user is logged in. This function should use the session database, like the platform did when checking for cuncurrent users.

I think this is the best way.