use of org.candlepin.auth.permissions.PermissionFactory in project candlepin by candlepin.
the class User method getPermissions.
/**
* Full list of permissions for this user.
*
* Includes those from roles stored in the database, as well as those explicitly added
* by the user service adapter.
*
* @return full list of permissions for this user.
*/
@XmlTransient
public Set<Permission> getPermissions() {
PermissionFactory permFactory = new PermissionFactory();
Set<Permission> perms = new HashSet<>();
for (Role r : getRoles()) {
perms.addAll(permFactory.createPermissions(this, r.getPermissions()));
}
perms.addAll(this.permissions);
return perms;
}
Aggregations