Hi ,
I want to fetch tranport user of a particular replication agent to check what permission he has.
Is there a way to check ?
Thanks in advance. !
Pallavi
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Pallavi,
You can not get the User object of transport user. However, you can get the transport user id and password and using this you can create User object to check permission of User.
The way you can get the transport user id is :
Get the 'com.day.cq.replication.AgentManager' (I think resourceResolver can be adapted to this). Then Get the agent using
Agent agent = agentMgr.getAgents().get("id") where id is the replication agent Id
and then you can do the following to get transportUserId and password :
String transportUserid = agent.getConfiguration().getTransportUser();
String pass = agent.getTransportPassword();
Views
Replies
Total Likes
Hi Pallavi,
You can not get the User object of transport user. However, you can get the transport user id and password and using this you can create User object to check permission of User.
The way you can get the transport user id is :
Get the 'com.day.cq.replication.AgentManager' (I think resourceResolver can be adapted to this). Then Get the agent using
Agent agent = agentMgr.getAgents().get("id") where id is the replication agent Id
and then you can do the following to get transportUserId and password :
String transportUserid = agent.getConfiguration().getTransportUser();
String pass = agent.getTransportPassword();
Views
Replies
Total Likes
AgentManager agmr=resourceResolver.adaptTo(AgentManager.class); is giving me null
where as for others(ex: UserManager not giving null)
is there any other way ?
Views
Replies
Total Likes
Did you try getting agentmanager by @reference annotation?
Hi Rajeev,
Thanks ..
It worked
Thanks,
Pallavi
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies