[Minor] Added UserRep.hasRole()

This commit is contained in:
Robert von Burg 2017-04-24 16:59:39 +02:00
parent d1a392f025
commit 5eda6e57e7
1 changed files with 12 additions and 0 deletions

View File

@ -213,6 +213,18 @@ public class UserRep implements Serializable {
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
*/