r1716 - in trunk: wao-services/src/main/java/fr/ifremer/wao/services wao-web/src/main/java/fr/ifremer/wao/web wao-web/src/main/java/fr/ifremer/wao/web/action/administration wao-web/src/main/resources/i18n wao-web/src/main/webapp/WEB-INF/content/administration wao-web/src/main/webapp/WEB-INF/content/obsmer wao-web/src/main/webapp/WEB-INF/decorators
Author: bleny Date: 2014-03-06 17:50:28 +0100 (Thu, 06 Mar 2014) New Revision: 1716 Url: http://forge.codelutin.com/projects/wao/repository/revisions/1716 Log: refs #4560 refs #4553 add security for news and administration Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoInterceptor.java trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoSession.java trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/EditWaoUserAction.java trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ReferentialManagementAction.java trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/WaoUsersAction.java trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties trunk/wao-web/src/main/webapp/WEB-INF/content/administration/edit-wao-user.jsp trunk/wao-web/src/main/webapp/WEB-INF/content/administration/referential-management.jsp trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/news.jsp trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.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-03-06 13:50:31 UTC (rev 1715) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java 2014-03-06 16:50:28 UTC (rev 1716) @@ -1,6 +1,8 @@ package fr.ifremer.wao.services; +import com.google.common.base.Preconditions; import fr.ifremer.wao.entity.Company; +import fr.ifremer.wao.entity.News; import fr.ifremer.wao.entity.ObsProgram; import fr.ifremer.wao.entity.UserProfile; import fr.ifremer.wao.entity.UserRole; @@ -97,4 +99,71 @@ return waoUser.getCompany(); } + public boolean isAuthorizedToChangeUserRights() { + boolean authorizedToChangeUserRights = isAuthorizedToSetAdmin() + || isAuthorizedToSetCoordinator() + || isAuthorizedToSetObserver() + || isAuthorizedToSetGuest() + || isAuthorizedToSetProfessional(); + return authorizedToChangeUserRights; + } + + public boolean isAuthorizedToActiveUser() { + return userProfile.isAdmin(); + } + + public boolean isAuthorizedToChangeUserCompany() { + return userProfile.isAdmin(); + } + + public boolean isAuthorizedToSetAdmin() { + return userProfile.isAdmin(); + } + + public boolean isAuthorizedToSetCoordinator() { + return userProfile.isAdmin(); + } + + public boolean isAuthorizedToSetObserver() { + boolean authorizedToSetObserver = userProfile.isAdmin() + || userProfile.isCoordinator(); + return authorizedToSetObserver; + } + + public boolean isAuthorizedToSetGuest() { + return userProfile.isAdmin(); + } + + public boolean isAuthorizedToSetProfessional() { + return userProfile.isAdmin(); + } + + public boolean isAuthorizedToUpdateReferential() { + return userProfile.isAdmin(); + } + + public boolean isAuthorizedToViewCompanies() { + return userProfile.isAdmin(); + } + + public boolean isAuthorizedToViewCompanyUsers() { + return userProfile.isAdmin() || userProfile.isCoordinator(); + } + + public boolean isAuthorizedToCreateNews() { + return userProfile.isAdmin() || userProfile.isCoordinator(); + } + + public boolean isAuthorizedToEditOrDeleteNews(News news) { + Preconditions.checkArgument(news.getObsProgram() == null || news.getObsProgram().equals(userProfile.getObsProgram())); + boolean authorizedToEditOrDeleteNews; + if (userProfile.isAdmin()) { + authorizedToEditOrDeleteNews = true; + } else if (userProfile.isCoordinator()) { + authorizedToEditOrDeleteNews = waoUser.getCompany().equals(news.getCompany()); + } else { + authorizedToEditOrDeleteNews = false; + } + return authorizedToEditOrDeleteNews; + } } Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoInterceptor.java =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoInterceptor.java 2014-03-06 13:50:31 UTC (rev 1715) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoInterceptor.java 2014-03-06 16:50:28 UTC (rev 1716) @@ -5,6 +5,12 @@ import com.opensymphony.xwork2.interceptor.Interceptor; import fr.ifremer.wao.WaoApplicationConfig; import fr.ifremer.wao.WaoTopiaPersistenceContext; +import fr.ifremer.wao.entity.ObsProgram; +import fr.ifremer.wao.entity.UserProfile; +import fr.ifremer.wao.entity.UserProfileImpl; +import fr.ifremer.wao.entity.UserRole; +import fr.ifremer.wao.entity.WaoUser; +import fr.ifremer.wao.services.AuthenticatedWaoUser; import fr.ifremer.wao.services.WaoService; import fr.ifremer.wao.services.WaoServiceContext; import org.apache.commons.collections.CollectionUtils; @@ -46,6 +52,17 @@ WaoSession waoSession = getWaoSession(invocation); + if (waoSession.getAuthenticatedWaoUser() == null) { + // login à l'arrache + WaoUser admin = serviceContext.getPersistenceContext().getWaoUserDao().forLoginEquals("admin").findUnique(); + UserProfile userProfile = new UserProfileImpl(); + userProfile.setUserRole(UserRole.COORDINATOR); + userProfile.setObsProgram(ObsProgram.OBSMER); + userProfile.setCanWrite(true); + AuthenticatedWaoUser authenticatedWaoUser = new AuthenticatedWaoUser(admin, userProfile); + waoSession.setAuthenticatedWaoUser(authenticatedWaoUser); + } + if (CollectionUtils.isNotEmpty(waoSession.getMessages())) { for (String message : waoSession.getMessages()) { Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoSession.java =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoSession.java 2014-03-06 13:50:31 UTC (rev 1715) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/WaoSession.java 2014-03-06 16:50:28 UTC (rev 1716) @@ -1,11 +1,6 @@ package fr.ifremer.wao.web; import com.google.common.collect.Lists; -import fr.ifremer.wao.entity.ObsProgram; -import fr.ifremer.wao.entity.UserProfileImpl; -import fr.ifremer.wao.entity.UserRole; -import fr.ifremer.wao.entity.WaoUser; -import fr.ifremer.wao.entity.WaoUserImpl; import fr.ifremer.wao.services.AuthenticatedWaoUser; import java.io.Serializable; @@ -49,13 +44,6 @@ } public AuthenticatedWaoUser getAuthenticatedWaoUser() { - if (authenticatedWaoUser == null) { - WaoUser waoUser = new WaoUserImpl(); - UserProfileImpl userProfile = new UserProfileImpl(); - userProfile.setObsProgram(ObsProgram.OBSMER); - userProfile.setUserRole(UserRole.ADMIN); - authenticatedWaoUser = new AuthenticatedWaoUser(waoUser, userProfile); - } return authenticatedWaoUser; } Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/EditWaoUserAction.java =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/EditWaoUserAction.java 2014-03-06 13:50:31 UTC (rev 1715) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/EditWaoUserAction.java 2014-03-06 16:50:28 UTC (rev 1716) @@ -69,6 +69,8 @@ addFieldError("updateWaoUserCommand.companyId", t("wao.ui.form.updateWaoUserCommand.requiredCompany")); } + // FIXME brendan 06/03/14 check login uniqueness + } @Override Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ReferentialManagementAction.java =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ReferentialManagementAction.java 2014-03-06 13:50:31 UTC (rev 1715) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ReferentialManagementAction.java 2014-03-06 16:50:28 UTC (rev 1716) @@ -1,5 +1,6 @@ package fr.ifremer.wao.web.action.administration; +import com.google.common.base.Preconditions; import com.opensymphony.xwork2.Preparable; import fr.ifremer.wao.services.service.administration.ReferentialService; import fr.ifremer.wao.services.service.administration.ReferentialState; @@ -20,6 +21,8 @@ @Override public void prepare() { + Preconditions.checkState(getAuthenticatedWaoUser().isAuthorizedToUpdateReferential()); + referentialStates = referentialService.getReferentialStates(getObsProgram()); } Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/WaoUsersAction.java =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/WaoUsersAction.java 2014-03-06 13:50:31 UTC (rev 1715) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/WaoUsersAction.java 2014-03-06 16:50:28 UTC (rev 1716) @@ -1,6 +1,7 @@ package fr.ifremer.wao.web.action.administration; import com.google.common.base.Optional; +import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.opensymphony.xwork2.Preparable; import fr.ifremer.wao.entity.WaoUser; @@ -28,6 +29,12 @@ @Override public void prepare() { + Preconditions.checkState(getAuthenticatedWaoUser().isAuthorizedToViewCompanyUsers()); + + if (getAuthenticatedWaoUser().isCoordinator()) { + optionalCompanyId = Optional.of(getAuthenticatedWaoUser().getCompany().getTopiaId()); + } + waoUsers = service.getWaoUsers(optionalCompanyId); } Modified: trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties =================================================================== --- trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties 2014-03-06 13:50:31 UTC (rev 1715) +++ trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties 2014-03-06 16:50:28 UTC (rev 1716) @@ -333,6 +333,7 @@ wao.ui.page.UserProfileForm.title=Profile management wao.ui.page.companies.title=Companies wao.ui.page.waoUsers.title=Users +wao.ui.page.waoUsers.titleForCompany=Users for company %s wao.ui.publishedByProgram=Pusblished by program wao.ui.publishedByYourCompany=Published by company wao.ui.sampleRow.creation=Creation of a sample row Modified: trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties =================================================================== --- trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties 2014-03-06 13:50:31 UTC (rev 1715) +++ trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties 2014-03-06 16:50:28 UTC (rev 1716) @@ -333,6 +333,7 @@ wao.ui.page.UserProfileForm.title=Gestion du profil wao.ui.page.companies.title=Sociétés wao.ui.page.waoUsers.title=Utilisateurs +wao.ui.page.waoUsers.titleForCompany=Utilisateurs de la société %s wao.ui.publishedByProgram=Publiée par le programme wao.ui.publishedByYourCompany=Publiée par la société wao.ui.sampleRow.creation=Création d'une ligne du plan d'échantillonnage Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/administration/edit-wao-user.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/administration/edit-wao-user.jsp 2014-03-06 13:50:31 UTC (rev 1715) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/administration/edit-wao-user.jsp 2014-03-06 16:50:28 UTC (rev 1716) @@ -51,21 +51,30 @@ <s:textfield name="updateWaoUserCommand.waoUser.firstName" label="%{getText('wao.ui.field.WaoUser.firstName')}" requiredLabel="true" /> <s:textfield name="updateWaoUserCommand.waoUser.lastName" label="%{getText('wao.ui.field.WaoUser.lastName')}" requiredLabel="true" /> - <s:select name="updateWaoUserCommand.companyId" - label="%{getText('wao.ui.entity.Company')}" - list="updateWaoUserCommand.allCompanies" - listValue="%{value.name}" - requiredLabel="true" - cssClass="input-xxlarge" /> - <s:checkbox name="updateWaoUserCommand.waoUser.active" label="%{getText('wao.ui.field.WaoUser.active')}" /> + <s:if test="authenticatedWaoUser.authorizedToChangeUserCompany"> + <s:select name="updateWaoUserCommand.companyId" + label="%{getText('wao.ui.entity.Company')}" + list="updateWaoUserCommand.allCompanies" + listValue="%{value.name}" + requiredLabel="true" + cssClass="input-xxlarge" /> + </s:if> + + <s:if test="authenticatedWaoUser.authorizedToActiveUser"> + <s:checkbox name="updateWaoUserCommand.waoUser.active" label="%{getText('wao.ui.field.WaoUser.active')}" /> + </s:if> + </fieldset> <fieldset> <legend><s:text name="wao.ui.form.WaoUser.credentials" /></legend> - <s:textfield name="updateWaoUserCommand.waoUser.login" label="%{getText('wao.ui.field.WaoUser.login')}" requiredLabel="true" cssClass="input-xlarge" /> + <s:textfield name="updateWaoUserCommand.waoUser.login" + label="%{getText('wao.ui.field.WaoUser.login')}" + requiredLabel="true" + cssClass="input-xlarge" /> <s:radio name="updateWaoUserCommand.passwordStrategy" label="%{getText('wao.ui.form.updateWaoUserCommand.passwordStrategy')}" @@ -80,27 +89,38 @@ </fieldset> - <fieldset> + <s:if test="authenticatedWaoUser.authorizedToChangeUserRights"> + <fieldset> - <legend><s:text name="wao.ui.form.WaoUser.rights" /></legend> + <legend><s:text name="wao.ui.form.WaoUser.rights" /></legend> - <s:checkbox name="updateWaoUserCommand.admin" label="%{getText('wao.ui.form.updateWaoUserCommand.admin')}" /> - <s:checkbox name="updateWaoUserCommand.adminReadOnly" label="%{getText('wao.ui.form.updateWaoUserCommand.adminReadOnly')}" /> - <s:checkbox name="updateWaoUserCommand.coordinator" label="%{getText('wao.ui.form.updateWaoUserCommand.coordinator')}" /> - <s:checkbox name="updateWaoUserCommand.coordinatorReadOnly" label="%{getText('wao.ui.form.updateWaoUserCommand.coordinatorReadOnly')}" /> - <s:checkbox name="updateWaoUserCommand.observer" label="%{getText('wao.ui.form.updateWaoUserCommand.observer')}" /> - <s:checkbox name="updateWaoUserCommand.observerReadOnly" label="%{getText('wao.ui.form.updateWaoUserCommand.observerReadOnly')}" /> - <s:checkbox name="updateWaoUserCommand.guest" label="%{getText('wao.ui.form.updateWaoUserCommand.guest')}" /> - <s:checkbox name="updateWaoUserCommand.guestReadOnly" label="%{getText('wao.ui.form.updateWaoUserCommand.guestReadOnly')}" /> - <s:checkbox name="updateWaoUserCommand.professional" label="%{getText('wao.ui.form.updateWaoUserCommand.professional')}" /> - <s:checkbox name="updateWaoUserCommand.professionalReadOnly" label="%{getText('wao.ui.form.updateWaoUserCommand.professionalReadOnly')}" /> + <s:if test="authenticatedWaoUser.authorizedToSetAdmin"> + <s:checkbox name="updateWaoUserCommand.admin" label="%{getText('wao.ui.form.updateWaoUserCommand.admin')}" /> + <s:checkbox name="updateWaoUserCommand.adminReadOnly" label="%{getText('wao.ui.form.updateWaoUserCommand.adminReadOnly')}" /> + </s:if> + <s:if test="authenticatedWaoUser.authorizedToSetCoordinator"> + <s:checkbox name="updateWaoUserCommand.coordinator" label="%{getText('wao.ui.form.updateWaoUserCommand.coordinator')}" /> + <s:checkbox name="updateWaoUserCommand.coordinatorReadOnly" label="%{getText('wao.ui.form.updateWaoUserCommand.coordinatorReadOnly')}" /> + </s:if> + <s:if test="authenticatedWaoUser.authorizedToSetObserver"> + <s:checkbox name="updateWaoUserCommand.observer" label="%{getText('wao.ui.form.updateWaoUserCommand.observer')}" /> + <s:checkbox name="updateWaoUserCommand.observerReadOnly" label="%{getText('wao.ui.form.updateWaoUserCommand.observerReadOnly')}" /> + </s:if> + <s:if test="authenticatedWaoUser.authorizedToSetGuest"> + <s:checkbox name="updateWaoUserCommand.guest" label="%{getText('wao.ui.form.updateWaoUserCommand.guest')}" /> + <s:checkbox name="updateWaoUserCommand.guestReadOnly" label="%{getText('wao.ui.form.updateWaoUserCommand.guestReadOnly')}" /> + </s:if> + <s:if test="authenticatedWaoUser.authorizedToSetProfessional"> + <s:checkbox name="updateWaoUserCommand.professional" label="%{getText('wao.ui.form.updateWaoUserCommand.professional')}" /> + <s:checkbox name="updateWaoUserCommand.professionalReadOnly" label="%{getText('wao.ui.form.updateWaoUserCommand.professionalReadOnly')}" /> + <div id="defineCanReadBoats"> + <s:textarea name="updateWaoUserCommand.canReadBoats" label="%{getText('wao.ui.form.updateWaoUserCommand.canReadBoats')}" /> + </div> + </s:if> - <div id="defineCanReadBoats"> - <s:textarea name="updateWaoUserCommand.canReadBoats" label="%{getText('wao.ui.form.updateWaoUserCommand.canReadBoats')}" /> - </div> + </fieldset> + </s:if> - </fieldset> - <fieldset> <legend><s:text name="wao.ui.form.WaoUser.preferences" /></legend> Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/administration/referential-management.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/administration/referential-management.jsp 2014-03-06 13:50:31 UTC (rev 1715) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/administration/referential-management.jsp 2014-03-06 16:50:28 UTC (rev 1716) @@ -130,13 +130,13 @@ <table class="table table-bordered"> <tr> <th> - <s:text name="fr.ifremer.wao.services.service.ReferentialState.referentialName" /> + <s:text name="fr.ifremer.wao.services.service.administration.ReferentialState.referentialName" /> </th> <th> - <s:text name="fr.ifremer.wao.services.service.ReferentialState.size" /> + <s:text name="fr.ifremer.wao.services.service.administration.ReferentialState.size" /> </th> <th> - <s:text name="fr.ifremer.wao.services.service.ReferentialState.lastUpdate" /> + <s:text name="fr.ifremer.wao.services.service.administration.ReferentialState.lastUpdate" /> </th> </tr> <s:iterator value="referentialStates"> Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/news.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/news.jsp 2014-03-06 13:50:31 UTC (rev 1715) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/news.jsp 2014-03-06 16:50:28 UTC (rev 1716) @@ -7,12 +7,14 @@ </head> - <s:url action="edit-news!input" id="createNewsUrl" /> - <s:a href="%{createNewsUrl}"> - <i class="icon-plus"></i> <s:text name="wao.ui.action.createNews" /> - </s:a> + <s:if test="authenticatedWaoUser.authorizedToCreateNews"> + <s:url action="edit-news!input" id="createNewsUrl" /> + <s:a href="%{createNewsUrl}"> + <i class="icon-plus"></i> <s:text name="wao.ui.action.createNews" /> + </s:a> + </s:if> - <s:iterator value="recentNews"> + <s:iterator value="recentNews" var="aRecentNews"> <div class="news"> <h1> @@ -23,27 +25,30 @@ <p> <s:if test="fromAdmin"> - <s:property value="text('wao.ui.publishedByProgram')" /> + <s:text name="wao.ui.publishedByProgram" /> </s:if> <s:else> - <s:property value="text('wao.ui.publishedByYourCompany')" /> + <s:text name="wao.ui.publishedByYourCompany" /> </s:else> + <s:text name="wao.ui.misc.onDate" /> <s:property value="text('wao.ui.misc.onDate')" /> <s:property value="topiaCreateDate" /> - <s:url action="edit-news!input" id="editNewsUrl"> - <s:param name="newsId" value="topiaId" /> - </s:url> - <s:a href="%{editNewsUrl}"> - <i class="icon-edit"></i> <s:text name="wao.ui.action.edit" /> - </s:a> + <s:if test="authenticatedWaoUser.isAuthorizedToEditOrDeleteNews(#aRecentNews)"> + <s:url action="edit-news!input" id="editNewsUrl"> + <s:param name="newsId" value="topiaId" /> + </s:url> + <s:a href="%{editNewsUrl}"> + <i class="icon-edit"></i> <s:text name="wao.ui.action.edit" /> + </s:a> - <s:url action="delete-news" id="deleteNewsUrl"> - <s:param name="newsId" value="topiaId" /> - </s:url> - <s:a href="%{deleteNewsUrl}"> - <i class="icon-trash"></i> <s:text name="wao.ui.action.delete" /> - </s:a> + <s:url action="delete-news" id="deleteNewsUrl"> + <s:param name="newsId" value="topiaId" /> + </s:url> + <s:a href="%{deleteNewsUrl}"> + <i class="icon-trash"></i> <s:text name="wao.ui.action.delete" /> + </s:a> + </s:if> </p> </div> Modified: trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-03-06 13:50:31 UTC (rev 1715) +++ trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-03-06 16:50:28 UTC (rev 1716) @@ -29,7 +29,7 @@ <li class="active"> <s:url namespace="/%{obsProgram.name().toLowerCase()}" action="news" id="newsUrl" /> <s:a href="%{newsUrl}"> - <s:text name="wao.ui.page.Index.title" /> + <i class="icon-home"></i> <s:text name="wao.ui.page.Index.title" /> </s:a> </li> <li> @@ -64,18 +64,32 @@ <b class="caret"></b> </a> <ul class="dropdown-menu"> - <li> - <s:url namespace="/administration" action="referential-management" id="referentialManagementUrl" /> - <s:a href="%{referentialManagementUrl}"> - <i class="icon-upload"></i> <s:text name="wao.ui.page.ReferentialManagement.title" /> - </s:a> - </li> - <li> - <s:url namespace="/administration" action="companies" id="companiesUrl" /> - <s:a href="%{companiesUrl}"> - <i class="icon-user"></i> <s:text name="wao.ui.page.companies.title" /> - </s:a> - </li> + <s:if test="authenticatedWaoUser.authorizedToUpdateReferential"> + <li> + <s:url namespace="/administration" action="referential-management" id="referentialManagementUrl" /> + <s:a href="%{referentialManagementUrl}"> + <i class="icon-upload"></i> <s:text name="wao.ui.page.ReferentialManagement.title" /> + </s:a> + </li> + </s:if> + <s:if test="authenticatedWaoUser.authorizedToViewCompanies"> + <li> + <s:url namespace="/administration" action="companies" id="companiesUrl" /> + <s:a href="%{companiesUrl}"> + <i class="icon-user"></i> <s:text name="wao.ui.page.companies.title" /> + </s:a> + </li> + </s:if> + <s:if test="authenticatedWaoUser.authorizedToViewCompanyUsers"> + <li> + <s:url namespace="/administration" action="wao-users" id="companyUsersUrl"> + <s:param name="companyId" value="authenticatedWaoUser.waoUser.company.topiaId" /> + </s:url> + <s:a href="%{companyUsersUrl}"> + <i class="icon-user"></i> <s:property value="t('wao.ui.page.waoUsers.titleForCompany', authenticatedWaoUser.waoUser.company.name)" /> + </s:a> + </li> + </s:if> </ul> </li> <li class="dropdown"> @@ -100,9 +114,8 @@ </s:a> </li> <li> - <s:url namespace="/administration" action="edit-wao-user!input" id="editWaoUserUrl"> - <s:param name="waoUserId" value="waoUserId" /> + <s:param name="waoUserId" value="%{authenticatedWaoUser.waoUser.topiaId}" /> </s:url> <s:a href="%{editWaoUserUrl}"> <i class="icon-user"></i> <s:text name="wao.ui.page.UserProfileForm.title" /> @@ -149,6 +162,11 @@ </a> </li> <li> + <a href="http://forms.ifremer.fr/sih/wao-demande-dintervention-sur-le-site/" title="Page d'accueil du SIH" target="_blank"> + Demande d’intervention + </a> + </li> + <li> <a href="http://www.gnu.org/licenses/agpl.html" title="License AGPL v3" target="_blank"> AGPLv3 </a>
participants (1)
-
bleny@users.forge.codelutin.com