Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] How to retrieve current user account info inIPermissionStore.loadPermissions()?

Hi Yau,

There are two services:
- ISubjectHolderService
- ISessionHolderService

which let you access the required information.

For the ISubjectHolderService there is a helper class SubjectAccessor. For the ISessionHolderService you need to do the usual OSGi stuff to get the service or use service injection.

HTH

Tschüß,
Stefan

yau wrote:
Thanks your suggestion, Campo,

But even so, I would like to known how to store or retrieve the session or client specified info when the service called.

Yau

----- Original Message ----- From: "Christian Campo" <christian.campo@xxxxxxxxxxxx>
To: "Riena Developers list" <riena-dev@xxxxxxxxxxx>
Sent: Thursday, April 16, 2009 3:45 PM
Subject: Re: [riena-dev] How to retrieve current user account info inIPermissionStore.loadPermissions()?


Hi Yau,

the userid for which you like to retrieve a permission (the key to the database) is not the same as the userid with which you want to access the PermissionStore. The reason is potentially that you like to keep a persistent connection to the PermissionStore while the user for which to receive the data can change from call to call....

So I suggest that you fix a userid and password in your configuration and open a connection at the first call or at startup. Using that single connection you can then read the permissions for multiple users.

That is BTW as I expect you to do this with the SessionStore and the AuthenticationStore......

any more questions ? please ask

christian campo



Am 16.04.2009 um 08:52 schrieb yau:

Hi,

I use Riena to build my application server, my user permission data is stored in the database, and I want use the user's password to connect the database to get the permission data, but I dont known how to retrieve current user account info in IPermissionStore.loadPermissions()?

Hope your helps!

Yau<ATT00001.c>
_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev



Back to the top