Reformatting.
This commit is contained in:
parent
518ccada8c
commit
06c6c3b9f3
|
@ -22,13 +22,11 @@ import org.springframework.security.ConfigAttribute;
|
|||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Votes if any {@link ConfigAttribute#getAttribute()} starts with a prefix
|
||||
* indicating that it is a role. The default prefix string is <Code>ROLE_</code>,
|
||||
* but this may be overriden to any value. It may also be set to empty, which
|
||||
* means that essentially any attribute will be voted on. As described further
|
||||
* below, the effect of an empty prefix may not be quite desireable.
|
||||
* </p>
|
||||
* <p>
|
||||
* Abstains from voting if no configuration attribute commences with the role
|
||||
* prefix. Votes to grant access if there is an exact matching
|
||||
|
@ -36,7 +34,6 @@ import org.springframework.security.ConfigAttributeDefinition;
|
|||
* starting with the role prefix. Votes to deny access if there is no exact
|
||||
* matching <code>GrantedAuthority</code> to a <code>ConfigAttribute</code>
|
||||
* starting with the role prefix.
|
||||
* </p>
|
||||
* <p>
|
||||
* An empty role prefix means that the voter will vote for every
|
||||
* ConfigAttribute. When there are different categories of ConfigAttributes
|
||||
|
@ -45,23 +42,19 @@ import org.springframework.security.ConfigAttributeDefinition;
|
|||
* using preexisting role names without a prefix, and no ability exists to
|
||||
* prefix them with a role prefix on reading them in, such as provided for
|
||||
* example in {@link org.springframework.security.userdetails.jdbc.JdbcDaoImpl}.
|
||||
* </p>
|
||||
* <p>
|
||||
* All comparisons and prefixes are case sensitive.
|
||||
* </p>
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @author colin sampaleanu
|
||||
* @version $Id$
|
||||
*/
|
||||
public class RoleVoter implements AccessDecisionVoter {
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
private String rolePrefix = "ROLE_";
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public String getRolePrefix() {
|
||||
return rolePrefix;
|
||||
|
|
Loading…
Reference in New Issue