Revision 60661
Added by Konstantina Galouni about 3 years ago
modules/uoa-claims/trunk/src/main/java/eu/dnetlib/data/claims/utils/ManagerUtils.java | ||
---|---|---|
120 | 120 |
|
121 | 121 |
return managerUtilsList; |
122 | 122 |
} |
123 |
|
|
124 |
public Boolean isCommunityManager(String communityId, String userMail) { |
|
125 |
List<ManagerUtils> managerUtils = this.getManagersByEmail(communityId); |
|
126 |
if(managerUtils != null) { |
|
127 |
for(ManagerUtils manager : managerUtils) { |
|
128 |
if(manager.getEmail().equals(userMail)) { |
|
129 |
return true; |
|
130 |
} |
|
131 |
} |
|
132 |
} |
|
133 |
return false; |
|
134 |
} |
|
123 | 135 |
} |
modules/uoa-claims/trunk/src/main/resources/eu/dnetlib/data/claims/springContext-claims.xml | ||
---|---|---|
111 | 111 |
<property name="enabledCommunities" value="${services.claims.mail.enabledCommunities}"/> |
112 | 112 |
<property name="notifyCommunityManagers" value="${services.claims.mail.notifyCommunityManagers}"/> |
113 | 113 |
<property name="notifyProjectManagers" value="${services.claims.mail.notifyProjectManagers}"/> |
114 |
<property name="communityUtils" ref="communityUtils" /> |
|
114 |
<!-- <property name="communityUtils" ref="communityUtils" />--> |
|
115 |
<property name="managerUtils" ref="managerUtils" /> |
|
115 | 116 |
</bean> |
116 | 117 |
|
117 | 118 |
<bean id="communityUtils" class="eu.dnetlib.data.claims.utils.CommunityUtils"> |
Also available in: Unified diff
[Trunk | Claims Service]:
1. ManagerUtils.java: Added method "isCommunityManager()" to check if a user_email is among managers of a community.
2. springContext-claims.xml: Added in bean with id=emailSender, property name="managerUtils" and removed property name="communityUtils".