r2041 - in trunk: wao-services/src/main/java/fr/ifremer/wao/services wao-web/src/main/webapp/WEB-INF/content/obsmer
Author: bleny Date: 2014-06-17 12:29:55 +0200 (Tue, 17 Jun 2014) New Revision: 2041 Url: http://forge.codelutin.com/projects/wao/repository/revisions/2041 Log: fixes #5247 hide contacts comment for professional Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/contacts.jsp Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java 2014-06-17 10:26:54 UTC (rev 2040) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java 2014-06-17 10:29:55 UTC (rev 2041) @@ -189,6 +189,9 @@ public boolean isAuthorizedToExportContacts() { return userProfile.isAdmin() || userProfile.isCoordinatorOrObserver(); } + public boolean isAuthorizedToViewContactsComments() { + return ! userProfile.isProfessional(); + } public boolean isAuthorizedToEditSamplingPlan() { return userProfile.isAdmin() && isCanWrite(); Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/contacts.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/contacts.jsp 2014-06-17 10:26:54 UTC (rev 2040) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/contacts.jsp 2014-06-17 10:29:55 UTC (rev 2041) @@ -325,9 +325,11 @@ <th><s:text name="wao.ui.field.Contact.observedDataControl"/></th> <th class="date"><s:text name="wao.ui.field.Contact.restitution"/></th> <th><s:text name="wao.ui.contacts.observations"/></th> - <th><s:text name="wao.ui.field.Contact.comment"/></th> - <th><s:text name="wao.ui.field.Contact.commentCompany"/></th> - <th><s:text name="wao.ui.field.Contact.commentAdmin"/></th> + <s:if test="authenticatedWaoUser.authorizedToViewContactsComments"> + <th><s:text name="wao.ui.field.Contact.comment"/></th> + <th><s:text name="wao.ui.field.Contact.commentCompany"/></th> + <th><s:text name="wao.ui.field.Contact.commentAdmin"/></th> + </s:if> <th><s:text name="wao.ui.field.Contact.dataReliability"/></th> <th><s:text name="wao.ui.contacts.validation"/></th> <th><s:text name="wao.ui.actions"/></th> @@ -451,21 +453,23 @@ </span> </s:if> </td> - <td class="align-center"> - <s:if test=" ! comment.empty"> - <i title="<s:property value="comment" escapeHtml="false"/>" class="fa fa-comment"></i> - </s:if> - </td> - <td class="align-center"> - <s:if test=" ! commentCoordinator.empty"> - <i title="<s:property value="commentCoordinator" escapeHtml="false"/>" class="fa fa-comment"></i> - </s:if> - </td> - <td class="align-center"> - <s:if test=" ! commentAdmin.empty"> - <i title="<s:property value="commentAdmin" escapeHtml="false"/>" class="fa fa-comment"></i> - </s:if> - </td> + <s:if test="authenticatedWaoUser.authorizedToViewContactsComments"> + <td class="align-center"> + <s:if test=" ! comment.empty"> + <i title="<s:property value="comment" escapeHtml="false"/>" class="fa fa-comment"></i> + </s:if> + </td> + <td class="align-center"> + <s:if test=" ! commentCoordinator.empty"> + <i title="<s:property value="commentCoordinator" escapeHtml="false"/>" class="fa fa-comment"></i> + </s:if> + </td> + <td class="align-center"> + <s:if test=" ! commentAdmin.empty"> + <i title="<s:property value="commentAdmin" escapeHtml="false"/>" class="fa fa-comment"></i> + </s:if> + </td> + </s:if> <td> <s:if test="isBoardingDone(#contact)"> <s:if test="validationCompany">
participants (1)
-
bleny@users.forge.codelutin.com