Hi,
Le 20/05/2016 08:05, Jean-Baptiste Onofré a écrit :
Do you have the credential populated for the session ?
No. I have been searching for such an option since yesterday.
I did not find anything in Session or SessionFactory. This morning, I
dig into SecuredSessionFactory, but this is not that helpful. The only
thing I found was KarafTestSupport [0] that uses priviledged actions. It
works when I run my command with the "admin" role [1]. But I am not sure
this is the right solution.
And I am not sure either why there are two session factories in
KarafTestSupport.
One if a class field annotated with @Inject. The other is retrieved with
the getOsgiService() method. Is there a difference between both?
Eventually, most of the KarafTestSupport sub-classes do not set
principals when they try to execute a command, even those that run
bundle:install...
So, I have not yet understood everything.
Any help would be appreciated.
Regards,
Vincent.
[ 0 ] :
https://github.com/apache/karaf/blob/master/itests/src/test/java/org/apache/karaf/itests/KarafTestSupport.java
[ 1 ] : http://pastebin.com/A8yMC4SV
--
Vincent Zurczak
Linagora: www.linagora.com <http://www.linagora.com/>
Twitter <https://twitter.com/VincentZurczak> Vincent Zurczak @ LinkedIn
<http://fr.linkedin.com/pub/vincent-zurczak/18/b35/6a7> My Skype ID
<callto://vincent.zurczak> My English blog <http://vzurczak.wordpress.com>