mirror of
https://github.com/nicolabs/script-realm-plugin.git
synced 2025-09-21 00:32:17 +02:00
use new LoginScritpLauncher also for execution of group script
This commit is contained in:
parent
852b8ed3a2
commit
2c563c3fe2
|
@ -120,7 +120,7 @@ public class ScriptSecurityRealm extends AbstractPasswordBasedSecurityRealm {
|
|||
authorities.add(AUTHENTICATED_AUTHORITY);
|
||||
if (!StringUtils.isBlank(groupsCommandLine)) {
|
||||
StringWriter out = new StringWriter();
|
||||
LocalLauncher launcher = new LocalLauncher(new StreamTaskListener(out));
|
||||
LocalLauncher launcher = new LoginScriptLauncher(new StreamTaskListener(out));
|
||||
OutputStream scriptOut = new ByteArrayOutputStream();
|
||||
if (launcher.launch().cmds(QuotedStringTokenizer.tokenize(groupsCommandLine)).stdout(scriptOut).envs("U=" + username).join() == 0) {
|
||||
StringTokenizer tokenizer = new StringTokenizer(scriptOut.toString().trim(), groupsDelimiter);
|
||||
|
|
Loading…
Reference in a new issue