mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
partial user administration
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.commafeed.backend.dao;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.ejb.Stateless;
|
||||
@@ -13,6 +14,10 @@ import com.google.common.collect.Sets;
|
||||
@Stateless
|
||||
public class UserRoleService extends GenericDAO<UserRole, Long> {
|
||||
|
||||
public List<UserRole> findAll(User user) {
|
||||
return findByField(MF.i(MF.p(UserRole.class).getUser()), user);
|
||||
}
|
||||
|
||||
public Set<String> getRoles(User user) {
|
||||
Set<String> list = Sets.newHashSet();
|
||||
for (UserRole role : findByField(MF.i(proxy().getUser()), user)) {
|
||||
|
||||
Reference in New Issue
Block a user