I created a plugin that adds comments to the pool request when it is created. This comment is created on behalf of the user who created the pool request .
Can I specify an account from which to create these comments?
I created a plugin that adds comments to the pool request when it is created. This comment is created on behalf of the user who created the pool request .
Can I specify an account from which to create these comments?
Thanks.
Yeap, already find this code. Working in Bitbucket 4.11.1
ApplicationUser user = userService.getUserBySlug("username");
securityService.impersonating(user, "reason").call(new Operation<Object, RuntimeException>() {
@Override
public Object perform() throws RuntimeException {
//you code
return null;
}
});