Revision 60602
Added by Konstantinos Triantafyllou about 3 years ago
Utils.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import eu.dnetlib.uoaauthorizationlibrary.security.AuthorizationService; |
4 | 4 |
import eu.dnetlib.uoanotificationservice.dao.NotificationDAO; |
5 |
import eu.dnetlib.uoanotificationservice.entities.Notification; |
|
6 |
import eu.dnetlib.uoanotificationservice.services.NotificationService; |
|
7 | 5 |
import org.apache.log4j.Logger; |
8 | 6 |
import org.springframework.beans.factory.annotation.Autowired; |
9 | 7 |
import org.springframework.stereotype.Component; |
... | ... | |
25 | 23 |
public boolean canRead(String id) { |
26 | 24 |
Set<String> groups = new HashSet<>(authorizationService.getRoles()); |
27 | 25 |
groups.add("all"); |
28 |
groups.add(authorizationService.getAaiId());
|
|
26 |
groups.add(authorizationService.getEmail().toLowerCase());
|
|
29 | 27 |
return notificationDAO.findByIdAndUserNotAndGroupsIn(id, authorizationService.getAaiId(), groups) != null; |
30 | 28 |
} |
31 | 29 |
|
Also available in: Unified diff
[Notificaton Service | Trunk]: Fix a bug user email on groups