Skip to content

Commit

Permalink
ISPN-14375 Remove all references to Subject.doAs from docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tristantarrant authored and jabolina committed Jun 14, 2024
1 parent c3b7277 commit 7bc68b5
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ For this reason, you must execute code with a {brandname} user that has a role w

.Procedure

. If necessary, retrieve the current Subject from the {brandname} context or `AccessControlContext`:
. If necessary, retrieve the current Subject from the {brandname} context:
+
[source,java]
----
Expand All @@ -24,12 +24,6 @@ Security.getSubject();
Security.doAs(mySubject, (PrivilegedAction<String>)() -> cache.put("key", "value"));
----

[NOTE]
====
You can use the `Security.doAs()` or `Subject.doAs()` method.
{brandname} recommends `Security.doAs()` for better performance.
====

[role="_additional-resources"]
.Additional resources
* link:{javadocroot}/org/infinispan/security/Security.html[org.infinispan.security.Security]
Expand Down

0 comments on commit 7bc68b5

Please sign in to comment.