Permalink
Browse files

[feature] Function to get the Effective User

[doc] Some javadoc on new getters
  • Loading branch information...
1 parent fe141a5 commit c141cb27037e3f757fb654feb5acc0b63d14b551 @adamretter adamretter committed Nov 14, 2013
Showing with 19 additions and 0 deletions.
  1. +19 −0 src/org/exist/xquery/XQueryContext.java
@@ -3016,6 +3016,25 @@ public void resolveForwardReferences() throws XPathException
return envs;
}
+ /**
+ * Gets the Effective user
+ * i.e. the user that the query is executing as
+ *
+ * @return The Effective User
+ */
+ public Subject getEffectiveUser() {
+ return getBroker().getSubject();
+ }
+
+ /**
+ * Gets the Real User
+ * i.e. the user that initiated execution of the query
+ * Note this is not necessarily the same as the user that the
+ * query is executing as
+ * @see org.exist.xquery.XQueryContext#getEffectiveUser()
+ *
+ * @return The Real User
+ */
public Subject getRealUser() {
return realUser;
}

0 comments on commit c141cb2

Please sign in to comment.