This comes handy, if you only want to authenticate the users,
but have a security constraint with a role in the app.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@697213
13f79535-47bb-0310-9956-
ffa450edef68
*/
protected int curUserPattern = 0;
+ /**
+ * Add this role to every authenticated user
+ */
+ protected String commonRole = null;
+
+
// ------------------------------------------------------------- Properties
/**
}
+ /**
+ * Return the common role
+ */
+ public String getCommonRole() {
+
+ return commonRole;
+
+ }
+
+
+ /**
+ * Set the common role
+ *
+ * @param commonRole The common role
+ */
+ public void setCommonRole(String commonRole) {
+
+ this.commonRole = commonRole;
+
+ }
+
+
// ---------------------------------------------------------- Realm Methods
if (list == null) {
list = new ArrayList<String>();
}
+ if (commonRole != null)
+ list.add(commonRole);
// Are we configured to do role searches?
if ((roleFormat == null) || (roleName == null))
can be used. If no value is given the providers default is used.</p>
</attribute>
+ <attribute name="commonRole" required="false">
+ <p>A role name assigned to each successfully authenticated user in
+ addition to the roles retrieved from LDAP. If not specified, only
+ the roles retrieved via LDAP are used.</p>
+ </attribute>
+
<attribute name="connectionName" required="false">
<p>The directory username to use when establishing a
connection to the directory for LDAP search operations. If not
can be used. If no value is given the providers default is used.</p>
</attribute>
+ <attribute name="commonRole" required="false">
+ <p>A role name assigned to each successfully authenticated user in
+ addition to the roles retrieved from LDAP. If not specified, only
+ the roles retrieved via LDAP are used.</p>
+ </attribute>
+
<attribute name="connectionName" required="false">
<p>The directory username to use when establishing a
connection to the directory for LDAP search operations. If not