Skip to content

Commit 2b96031

Browse files
committed
wip
1 parent 4291d48 commit 2b96031

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

server/impl/src/main/java/com/walmartlabs/concord/server/process/ProcessSecurityContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public <T> T runAs(UUID userID, Callable<T> c) throws Exception {
129129

130130
return c.call();
131131
} finally {
132-
ThreadContext.unbindSubject();
132+
SecurityUtils.unbindSubject();
133133
ThreadContext.unbindSecurityManager();
134134
}
135135
}
@@ -150,7 +150,7 @@ public <T> T runAsCurrentUser(ProcessKey processKey, Callable<T> c) throws Excep
150150

151151
return c.call();
152152
} finally {
153-
ThreadContext.unbindSubject();
153+
SecurityUtils.unbindSubject();
154154
ThreadContext.unbindSecurityManager();
155155
}
156156
}

server/impl/src/main/java/com/walmartlabs/concord/server/security/SecurityUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ public static void bindSubject(Subject subject) {
7070
ThreadContext.bind(subject);
7171
}
7272

73+
public static void unbindSubject() {
74+
ThreadContext.unbindSubject();
75+
}
76+
7377
public static Subject getSubject() {
7478
return ThreadContext.getSubject();
7579
}

0 commit comments

Comments
 (0)