[Minor] Added UserRep.hasRole()
This commit is contained in:
parent
d1a392f025
commit
5eda6e57e7
|
@ -213,6 +213,18 @@ public class UserRep implements Serializable {
|
||||||
this.roles = roles;
|
this.roles = roles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this user has the given role
|
||||||
|
*
|
||||||
|
* @param role
|
||||||
|
* the role to check for
|
||||||
|
*
|
||||||
|
* @return returns true if this user has the given role
|
||||||
|
*/
|
||||||
|
public boolean hasRole(String role) {
|
||||||
|
return this.roles.contains(role);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the locale
|
* @return the locale
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue