Quantcast

Get list of users and roles from SimpleAccountManager

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Get list of users and roles from SimpleAccountManager

Alexander Monakhov
Hi all!

Please advise if there's an easy way to get the list of defined users and roles from SimpleAccountRealm created from ini file?

All relevant fields are protected in that class, but cannot I simply resolve the problem via inheritance as IniWebEnvironment explicitly instantiates WebIniSecurityManagerFactory in createDefaults.

The only feasible way I see is to subclass IniWebEnvironment and override createWebSecurityManager where I will pass custom WebIniSecurityManagerFactory, etc. This looks too cumbersome.

Will it be a good idea to add simple accessors to SimpleAccountRealm? (with protective copying, if needed).

I use Shiro 1.3.2

Thanks in advance!
Regards,
Alexander Monakhov.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Get list of users and roles from SimpleAccountManager

Alexander Monakhov
Hi there!

Not sure if my previous message was posted to mailing list.

Nevertheless, Shiro experts, please find time to take a look at the question below:)

Alexander Monakhov wrote
Hi all!

Please advise if there's an easy way to get the list of defined users and roles from SimpleAccountRealm created from ini file?

All relevant fields are protected in that class, but cannot I simply resolve the problem via inheritance as IniWebEnvironment explicitly instantiates WebIniSecurityManagerFactory in createDefaults.

The only feasible way I see is to subclass IniWebEnvironment and override createWebSecurityManager where I will pass custom WebIniSecurityManagerFactory, etc. This looks too cumbersome.

Will it be a good idea to add simple accessors to SimpleAccountRealm? (with protective copying, if needed).

I use Shiro 1.3.2

Thanks in advance!
Regards,
Alexander Monakhov.
Loading...