Pollen-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
April 2012
- 5 participants
- 111 discussions
r3333 - in trunk/pollen-ui-struts2/src/main: java/org/chorem/pollen/ui/actions java/org/chorem/pollen/ui/actions/admin java/org/chorem/pollen/ui/actions/poll java/org/chorem/pollen/ui/actions/user resources/config resources/org/chorem/pollen/ui/actions/user webapp/WEB-INF/decorators
by fdesbois@users.chorem.org 30 Apr '12
by fdesbois@users.chorem.org 30 Apr '12
30 Apr '12
Author: fdesbois
Date: 2012-04-30 17:52:41 +0200 (Mon, 30 Apr 2012)
New Revision: 3333
Url: http://chorem.org/repositories/revision/pollen/3333
Log:
#529 : improve redirect after login
- redirect to home if page is security
- error redirect to the same page and not home (same behavior if login success)
- do not override struts2 methods for messages/errors > rename all methods with Flash keyword
Removed:
trunk/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/user/Login-validation.xml
Modified:
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/DeleteUser.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/ManageUsers.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractPollForm.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ClosePoll.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/LoadPoll.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/SavePoll.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/VoteForPoll.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/DeleteFavoriteList.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/DeletePollAccount.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/Login.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/LostPassword.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/ManageFavoriteList.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/ManageFavoriteLists.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/Register.java
trunk/pollen-ui-struts2/src/main/resources/config/struts-user.xml
trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -232,8 +232,7 @@
return result;
}
- @Override
- public void addActionMessage(String message) {
+ public void addFlashMessage(String message) {
List<String> messages = getPollenSession().getDynamicData(PollenSession.SESSION_TOKEN_MESSAGES);
if (messages == null) {
messages = Lists.newArrayList(message);
@@ -243,8 +242,7 @@
}
}
- @Override
- public void addActionError(String message) {
+ public void addFlashError(String message) {
List<String> messages = getPollenSession().getDynamicData(PollenSession.SESSION_TOKEN_ERRORS);
if (messages == null) {
messages = Lists.newArrayList(message);
@@ -254,8 +252,7 @@
}
}
- @Override
- public Collection<String> getActionMessages() {
+ public Collection<String> getFlashMessages() {
List<String> result = getPollenSession().getDynamicData(PollenSession.SESSION_TOKEN_MESSAGES);
if (result == null) {
result = Collections.emptyList();
@@ -265,8 +262,7 @@
return result;
}
- @Override
- public Collection<String> getActionErrors() {
+ public Collection<String> getFlashErrors() {
List<String> result = getPollenSession().getDynamicData(PollenSession.SESSION_TOKEN_ERRORS);
if (result == null) {
result = Collections.emptyList();
@@ -276,37 +272,32 @@
return result;
}
- @Override
- public boolean hasActionMessages() {
+ public boolean hasFlashMessages() {
List<String> result = getPollenSession().getDynamicData(PollenSession.SESSION_TOKEN_MESSAGES);
return CollectionUtils.isNotEmpty(result);
}
- @Override
- public boolean hasActionErrors() {
+ public boolean hasFlashErrors() {
List<String> result = getPollenSession().getDynamicData(PollenSession.SESSION_TOKEN_ERRORS);
return CollectionUtils.isNotEmpty(result);
}
- @Override
- public void clearMessages() {
+ public void clearFlashMessages() {
List<String> result = getPollenSession().getDynamicData(PollenSession.SESSION_TOKEN_MESSAGES);
if (result != null) {
result.clear();
}
}
- @Override
- public void clearActionErrors() {
+ public void clearFlashErrors() {
List<String> result = getPollenSession().getDynamicData(PollenSession.SESSION_TOKEN_ERRORS);
if (result != null) {
result.clear();
}
}
- @Override
- public boolean hasErrors() {
+ public boolean hasAnyErrors() {
boolean result = super.hasErrors();
- return result || hasActionErrors();
+ return result || hasFlashErrors();
}
}
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/DeleteUser.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/DeleteUser.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/DeleteUser.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -69,7 +69,7 @@
service.deleteUser(userId);
getTransaction().commitTransaction();
- addActionMessage(
+ addFlashMessage(
_("pollen.information.user.deleted", user.getDisplayName()));
result = SUCCESS;
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/ManageUsers.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/ManageUsers.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/ManageUsers.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -79,7 +79,7 @@
try {
newService(UserService.class).createUser(user, true);
- addActionMessage(
+ addFlashMessage(
_("pollen.information.user.created",
user.getDisplayName()));
// remove this user, otherwise it will be reused in the user lists
@@ -109,7 +109,7 @@
try {
service.updateUser(user, null, true);
getTransaction().commitTransaction();
- addActionMessage(
+ addFlashMessage(
_("pollen.information.user.updated",
user.getDisplayName()));
@@ -139,7 +139,7 @@
// try {
// service.deleteUser(user.getTopiaId());
// getTransaction().commitTransaction();
-// addActionMessage(
+// addFlashMessage(
// _("pollen.information.user.deleted", user.getDisplayName()));
//
// // remove this user, otherwise it will be reused in the user lists
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractPollForm.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractPollForm.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractPollForm.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -257,9 +257,6 @@
public void prepareFormPage() throws Exception {
- // remove all stuff from session
- getPollenSession().clearDynamicData();
-
pollTypes = decorateToName(PollType.values());
choiceTypes = decorateToName(ChoiceType.values());
voteCountingTypes = decorateToName(VoteCountingType.values());
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -315,16 +315,16 @@
// Messages
if (poll.isClosed()) {
- addActionMessage(_("pollen.information.pollClosed"));
+ addFlashMessage(_("pollen.information.pollClosed"));
} else if (!isPollStarted()) {
- addActionMessage(_("pollen.information.pollNotStarted"));
+ addFlashMessage(_("pollen.information.pollNotStarted"));
} else if (isPollFinished()) {
- addActionMessage(_("pollen.information.pollFinished"));
+ addFlashMessage(_("pollen.information.pollFinished"));
} else if (pollCreator.equals(pollAccount)) {
- addActionMessage(_("pollen.information.vote.creatorUser"));
+ addFlashMessage(_("pollen.information.vote.creatorUser"));
}
if (isPollChoiceRunning()) {
- addActionMessage(_("pollen.information.pollChoiceRunning"));
+ addFlashMessage(_("pollen.information.pollChoiceRunning"));
}
if (log.isInfoEnabled()) {
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ClosePoll.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ClosePoll.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ClosePoll.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -52,7 +52,7 @@
service.closePoll(getPollId(), getPollenUserAccount(), getAccountId());
- addActionMessage(_("pollen.information.poll.closed"));
+ addFlashMessage(_("pollen.information.poll.closed"));
return SUCCESS;
}
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/LoadPoll.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/LoadPoll.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/LoadPoll.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -92,7 +92,7 @@
}
if (isVoteStarted()) {
- addActionMessage(_("pollen.information.poll.form.voteStarted"));
+ addFlashMessage(_("pollen.information.poll.form.voteStarted"));
}
return SUCCESS;
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/ResultForPoll.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -161,7 +161,7 @@
poll = service.getPollByPollId(pollId);
if (poll == null) {
- addActionError(_("pollen.error.pollNotFound"));
+ addFlashError(_("pollen.error.pollNotFound"));
} else {
if (byGroup == null) {
@@ -182,10 +182,10 @@
}
if (!userAllowed) {
- addActionError(_("pollen.error.userNotAllowed"));
+ addFlashError(_("pollen.error.userNotAllowed"));
} else if (poll.isRunning(serviceContext.getCurrentTime())) {
- addActionMessage(_("pollen.information.pollRunning"));
+ addFlashMessage(_("pollen.information.pollRunning"));
loadResults();
} else {
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/SavePoll.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/SavePoll.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/SavePoll.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -275,11 +275,11 @@
if (isEdit()) {
getPollService().updatePoll(poll);
- addActionMessage(_("pollen.information.poll.updated"));
+ addFlashMessage(_("pollen.information.poll.updated"));
} else {
getPollService().createPoll(poll);
- addActionMessage(_("pollen.information.poll.created"));
+ addFlashMessage(_("pollen.information.poll.created"));
}
// remove all stuff from session
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/VoteForPoll.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/VoteForPoll.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/VoteForPoll.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -118,7 +118,7 @@
getPollService().addVoteToPoll(getPoll(), voteCreated);
}
- clearMessages();
+ clearFlashMessages();
// For free Poll, display the update Url (useless if user is logged)
if (PollType.FREE == getPoll().getPollType() && !isUserLoggued()) {
@@ -133,11 +133,11 @@
log.debug(String.format("UpdateURL for poll '%s' and account '%s' = %s", pollId, accountId, updateUrl));
}
- addActionMessage(_("pollen.information.vote.createdWithUpdateUrl", updateUrl));
+ addFlashMessage(_("pollen.information.vote.createdWithUpdateUrl", updateUrl));
} else{
- addActionMessage(_("pollen.information.vote.created"));
+ addFlashMessage(_("pollen.information.vote.created"));
}
return SUCCESS;
}
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/DeleteFavoriteList.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/DeleteFavoriteList.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/DeleteFavoriteList.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -72,8 +72,8 @@
getTransaction().commitTransaction();
- addActionMessage(_("pollen.information.favoriteList.deleted",
- deletedFavoritedList.getName()));
+ addFlashMessage(_("pollen.information.favoriteList.deleted",
+ deletedFavoritedList.getName()));
result = SUCCESS;
} catch (UserNotFoundException e) {
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/DeletePollAccount.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/DeletePollAccount.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/DeletePollAccount.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -77,7 +77,7 @@
getTransaction().commitTransaction();
- addActionMessage(
+ addFlashMessage(
_("pollen.information.pollAccount.removedFromFavoriteList",
pollAccount.getVotingId()));
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/Login.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/Login.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/Login.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -23,7 +23,7 @@
*/
package org.chorem.pollen.ui.actions.user;
-import com.opensymphony.xwork2.interceptor.annotations.InputConfig;
+import org.apache.commons.lang.StringUtils;
import org.chorem.pollen.business.persistence.UserAccount;
import org.chorem.pollen.services.exceptions.UserInvalidPasswordException;
import org.chorem.pollen.services.exceptions.UserNotFoundException;
@@ -39,6 +39,8 @@
public class Login extends PollenActionSupport {
private static final long serialVersionUID = 1L;
+
+ private static final String HOME = "home";
protected String login;
@@ -70,24 +72,39 @@
this.redirectUrl = redirectUrl;
}
- @InputConfig(resultName = "error")
@Override
public String execute() throws Exception {
UserService service = newService(UserService.class);
+
+ if (StringUtils.isBlank(login) || StringUtils.isBlank(password)) {
+ addFlashError(_("pollen.error.user.bad.login.or.password"));
- String result = ERROR;
- try {
- UserAccount userAccount = service.connect(login, password);
- getPollenSession().setUserAccount(userAccount);
- addActionMessage(_("pollen.information.your.are.loggued"));
+ } else {
+ try {
+ UserAccount userAccount = service.connect(login, password);
+
+ getPollenSession().setUserAccount(userAccount);
+ addFlashMessage(_("pollen.information.your.are.loggued"));
+
+ } catch (UserNotFoundException e) {
+ addFlashError(_("pollen.error.user.bad.login.or.password"));
+ } catch (UserInvalidPasswordException e) {
+ addFlashError(_("pollen.error.user.bad.login.or.password"));
+ }
+ }
+
+ String result;
+ if (redirectUrl == null || redirectUrl.contains("/security")) {
+
+ // After security problem, redirect to home
+ result = HOME;
+
+ } else {
+
+ // Stay on the same page identified by redirectUrl
result = SUCCESS;
- } catch (UserNotFoundException e) {
- addActionError(_("pollen.error.user.bad.login.or.password"));
- } catch (UserInvalidPasswordException e) {
- addActionError(_("pollen.error.user.bad.login.or.password"));
}
-
return result;
}
}
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/LostPassword.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/LostPassword.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/LostPassword.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -53,7 +53,7 @@
public String execute() throws Exception {
if (StringUtils.isBlank(email) || !StringUtil.isEmail(email)) {
- addActionError( _("pollen.error.lostPassword.email"));
+ addFlashError(_("pollen.error.lostPassword.email"));
} else {
@@ -61,10 +61,10 @@
try {
service.lostPassword(email);
- addActionMessage(_("pollen.information.lostPassword.success"));
+ addFlashMessage(_("pollen.information.lostPassword.success"));
} catch (UserNotFoundException e) {
- addActionError(_("pollen.error.lostPassword.user"));
+ addFlashError(_("pollen.error.lostPassword.user"));
}
}
return SUCCESS;
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/ManageFavoriteList.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/ManageFavoriteList.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/ManageFavoriteList.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -105,9 +105,9 @@
favoriteList = service.getFavoriteList(
getPollenUserAccount(), favoriteListId);
} catch (FavoriteListNotFoundException e) {
- addActionError(_("pollen.error.favoriteList.not.found"));
+ addFlashError(_("pollen.error.favoriteList.not.found"));
} catch (FavoriteListNotOwnedByUserException e) {
- addActionError(_("pollen.error.favoriteList.not.owned.by.user"));
+ addFlashError(_("pollen.error.favoriteList.not.owned.by.user"));
}
}
@@ -125,7 +125,7 @@
service.addPollAccountToFavoriteList(favoriteList, pollAccount);
getTransaction().commitTransaction();
- addActionMessage(
+ addFlashMessage(
_("pollen.information.pollAccount.addedTofavoriteList",
pollAccount.getVotingId()));
@@ -153,7 +153,7 @@
service.editPollAccountToFavoriteList(favoriteList, pollAccount);
getTransaction().commitTransaction();
- addActionMessage(
+ addFlashMessage(
_("pollen.information.pollAccount.updatedTofavoriteList",
pollAccount.getVotingId()));
@@ -178,7 +178,7 @@
service.removePollAccountToFavoriteList(favoriteList, pollAccount);
getTransaction().commitTransaction();
- addActionMessage(
+ addFlashMessage(
_("pollen.information.pollAccount.removedFromFavoriteList",
pollAccount.getVotingId()));
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/ManageFavoriteLists.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/ManageFavoriteLists.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/ManageFavoriteLists.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -143,14 +143,14 @@
}
String result;
- if (hasErrors()) {
+ if (hasAnyErrors()) {
result = INPUT;
} else {
getTransaction().commitTransaction();
- addActionMessage(_("pollen.information.favoriteList.created",
- favoriteList.getName()));
+ addFlashMessage(_("pollen.information.favoriteList.created",
+ favoriteList.getName()));
action = null;
favoriteList = null;
result = SUCCESS;
@@ -167,8 +167,8 @@
favoriteList);
getTransaction().commitTransaction();
- addActionMessage(_("pollen.information.favoriteList.deleted",
- deletedFavoritedList.getName()));
+ addFlashMessage(_("pollen.information.favoriteList.deleted",
+ deletedFavoritedList.getName()));
action = null;
favoriteList = null;
return SUCCESS;
@@ -194,16 +194,16 @@
} catch (ParticipantAlreadyFoundInListException ex) {
// WARNING ?
- addActionError(
+ addFlashError(
_("pollen.error.favoriteList.import.participantExists"
- ,importedAccount.getEmail())
+ , importedAccount.getEmail())
);
}
}
} catch (FavoriteListImportException ex) {
String message = ex.getLocalizedMessage(getLocale());
- addActionError(message);
+ addFlashError(message);
}
}
}
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/Register.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/Register.java 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/user/Register.java 2012-04-30 15:52:41 UTC (rev 3333)
@@ -74,7 +74,7 @@
newService(UserService.class).createUser(user, false);
getPollenSession().setUserAccount(createdUser);
- addActionMessage(_("pollen.information.your.are.loggued"));
+ addFlashMessage(_("pollen.information.your.are.loggued"));
result = SUCCESS;
} catch (UserLoginAlreadyUsedException e) {
addFieldError("user.login", _("pollen.error.user.login.already.used"));
Modified: trunk/pollen-ui-struts2/src/main/resources/config/struts-user.xml
===================================================================
--- trunk/pollen-ui-struts2/src/main/resources/config/struts-user.xml 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/resources/config/struts-user.xml 2012-04-30 15:52:41 UTC (rev 3333)
@@ -34,7 +34,7 @@
<!-- login -->
<action name="login" class="org.chorem.pollen.ui.actions.user.Login">
- <result name="error">/WEB-INF/jsp/home.jsp</result>
+ <result name="home" type="redirectToHome"/>
<result type="redirect2"/>
</action>
Deleted: trunk/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/user/Login-validation.xml
===================================================================
--- trunk/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/user/Login-validation.xml 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/user/Login-validation.xml 2012-04-30 15:52:41 UTC (rev 3333)
@@ -1,43 +0,0 @@
-<!--
- #%L
- Pollen :: UI (strust2)
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.3//EN"
- "http://www.opensymphony.com/xwork/xwork-validator-1.0.3.dtd">
-<validators>
-
- <field name="login">
-
- <field-validator type="requiredstring">
- <message key="pollen.error.login.required"/>
- </field-validator>
- </field>
-
- <field name="password">
-
- <field-validator type="requiredstring">
- <message key="pollen.error.password.required"/>
- </field-validator>
-
- </field>
-
-</validators>
Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp
===================================================================
--- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-04-30 15:52:29 UTC (rev 3332)
+++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-04-30 15:52:41 UTC (rev 3333)
@@ -270,20 +270,20 @@
</noscript>
<%--<div t:type="nuiton/feedback" t:id="borderFeedback" t:autoClear="false"/>--%>
- <s:if test="hasActionMessages()">
+ <s:if test="hasFlashMessages()">
<div class="info_success clearfix">
<ul class="actionMessages fleft">
- <s:iterator value="actionMessages" var="message">
+ <s:iterator value="flashMessages" var="message">
<li><span><s:property value="#message" escapeHtml="false"/></span></li>
</s:iterator>
</ul>
</div>
</s:if>
- <s:if test="hasActionErrors()">
+ <s:if test="hasFlashErrors()">
<div class="info_error clearfix">
<ul class="actionErrors fleft">
- <s:iterator value="actionErrors" var="message">
+ <s:iterator value="flashErrors" var="message">
<li><span><s:property value="#message" escapeHtml="false"/></span></li>
</s:iterator>
</ul>
1
0
Author: fdesbois
Date: 2012-04-30 17:52:29 +0200 (Mon, 30 Apr 2012)
New Revision: 3332
Url: http://chorem.org/repositories/revision/pollen/3332
Log:
fixes #196 : add moderate link for votes. But for the moment the creator can't remove votes or comments.
Modified:
trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenNotifierWorker.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/EmailService.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollCommentService.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java
trunk/pollen-services/src/main/resources/i18n/pollen-services_en_GB.properties
trunk/pollen-services/src/main/resources/i18n/pollen-services_fr_FR.properties
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetCreatedPolls.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractPollForm.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/SavePoll.java
trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties
trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties
trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/resume.jsp
trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp
trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollListHelper.jsp
trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/createdList.jsp
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenNotifierWorker.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenNotifierWorker.java 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenNotifierWorker.java 2012-04-30 15:52:29 UTC (rev 3332)
@@ -90,7 +90,7 @@
for (Poll poll : polls) {
- PollUrl pollVoteUrl = pollService.getPollVoteUrl(poll);
+ PollUrl pollVoteUrl = pollService.getPollVoteUrl(poll, false);
preventRuleService.onPollToRemind(poll, pollVoteUrl);
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/EmailService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/EmailService.java 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/EmailService.java 2012-04-30 15:52:29 UTC (rev 3332)
@@ -37,6 +37,7 @@
import org.chorem.pollen.business.persistence.Poll;
import org.chorem.pollen.business.persistence.PollAccount;
import org.chorem.pollen.business.persistence.UserAccount;
+import org.chorem.pollen.common.PollType;
import org.chorem.pollen.services.PollenServiceSupport;
import org.nuiton.util.StringUtil;
@@ -124,7 +125,7 @@
}
}
- public void onPollCreated(Poll poll, PollUrl voteURL, PollUrl modifURL) {
+ public void onPollCreated(Poll poll, PollUrl voteURL, PollUrl moderateUrl, PollUrl modifURL) {
URL url = serviceContext.getApplicationURL();
@@ -136,11 +137,21 @@
// Mail au créateur
if (StringUtils.isNotEmpty(poll.getCreator().getEmail())) {
- String subject = l_(locale, "pollen.email.creatorEmail.subject",
- pollTitle);
- String content = l_(locale, "pollen.email.creatorEmail.content",
- pollTitle, voteURL, modifURL);
+
+ String subject, content;
+ if (PollType.FREE == poll.getPollType()) {
+ subject = l_(locale, "pollen.email.createPoll.subject",
+ pollTitle);
+ content = l_(locale, "pollen.email.createPoll.content",
+ pollTitle, voteURL, moderateUrl, modifURL);
+ } else {
+ subject = l_(locale, "pollen.email.createRestrictedPoll.subject",
+ pollTitle);
+ content = l_(locale, "pollen.email.createRestrictedPoll.content",
+ pollTitle, moderateUrl, modifURL);
+ }
+
PollenEmail pollenEmail = createPollenEmail(
poll.getCreator().getEmail(), subject, content);
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollCommentService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollCommentService.java 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollCommentService.java 2012-04-30 15:52:29 UTC (rev 3332)
@@ -92,7 +92,7 @@
PollService pollService = newService(PollService.class);
- PollUrl pollVoteUrl = pollService.getPollVoteUrl(poll);
+ PollUrl pollVoteUrl = pollService.getPollVoteUrl(poll, false);
PollFeedService pollFeedService = newService(PollFeedService.class);
pollFeedService.onAddComment(commentCreated, pollVoteUrl);
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java 2012-04-30 15:52:29 UTC (rev 3332)
@@ -197,18 +197,14 @@
Iterable<Choice> choices =
Iterables.transform(source.getChoice(), choiceCreator);
- // Ensure iteration with a new ArrayList instead of TransformingSequentialList
- // from guava Lists#transform() that doesn't support add() method
- result.setChoice(Lists.newArrayList(choices));
+ for (Choice choiceLoaded : choices) {
+ // Reset topiaId for clone case
+ if (clone) {
+ choiceLoaded.setTopiaId(null);
+ }
+ result.addChoice(choiceLoaded);
+ }
-// for (Choice choiceLoaded : source.getChoice()) {
-// Choice choiceEditable = newInstance(choiceDAO);
-// result.addChoice(choiceEditable);
-// // Do not keep choices topiaId, to simplify the update will delete old choices and create new ones
-// PollenBinderHelper.simpleCopy(
-// choiceLoaded, choiceEditable, false);
-// }
-
// -- VotingList -- //
VotingListDAO votingListDAO = getDAO(VotingList.class);
PersonToListDAO personToListDAO = getDAO(PersonToList.class);
@@ -318,12 +314,13 @@
commitTransaction("Could not create poll " + poll.getTitle());
- PollUrl pollVoteUrl = getPollVoteUrl(poll);
+ PollUrl pollVoteUrl = getPollVoteUrl(poll, false);
+ PollUrl pollModerateUrl = getPollVoteUrl(poll, true);
PollUrl pollEditUrl = getPollEditUrl(poll);
// email notification
EmailService emailService = newService(EmailService.class);
- emailService.onPollCreated(result, pollVoteUrl, pollEditUrl);
+ emailService.onPollCreated(result, pollVoteUrl, pollModerateUrl, pollEditUrl);
// feed notification
// XXX-fdesbois-2012-04-12 : if the feed is the same for everybody maybe
@@ -402,12 +399,12 @@
commitTransaction("Could not update poll [" + poll.getTopiaId() + "]");
}
- public PollUrl getPollVoteUrl(Poll poll) {
+ public PollUrl getPollVoteUrl(Poll poll, boolean moderate) {
URL applicationUrl = serviceContext.getApplicationURL();
String baseUrl = applicationUrl + "/poll/votefor/";
PollUri pollUri = PollUri.newPollUri(poll.getPollId());
- if (poll.getPollType() != PollType.FREE) {
+ if (moderate) {
String creatorId = poll.getCreator().getAccountId();
pollUri.setAccountId(creatorId);
}
@@ -976,7 +973,7 @@
// Send notification if necessary
PreventRuleService preventRuleService = newService(PreventRuleService.class);
- PollUrl pollVoteUrl = getPollVoteUrl(pollToUpdate);
+ PollUrl pollVoteUrl = getPollVoteUrl(pollToUpdate, false);
PollUrl modifUrl = getPollEditUrl(pollToUpdate);
preventRuleService.onVoteAdded(poll, pollVoteUrl, modifUrl);
}
@@ -1019,7 +1016,7 @@
result.setName(votingList.getName());
result.setWeight(votingList.getWeight());
- PollUrl voteURL = getPollVoteUrl(poll);
+ PollUrl voteURL = getPollVoteUrl(poll, false);
// Merge PersonToList
List<PersonToList> personToListsUpdated = Lists.newArrayList();
Modified: trunk/pollen-services/src/main/resources/i18n/pollen-services_en_GB.properties
===================================================================
--- trunk/pollen-services/src/main/resources/i18n/pollen-services_en_GB.properties 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-services/src/main/resources/i18n/pollen-services_en_GB.properties 2012-04-30 15:52:29 UTC (rev 3332)
@@ -8,8 +8,10 @@
pollen.common.numberVote-blank-votes=Number of blank votes
pollen.common.numberVote-total=Sum of numbers
pollen.common.numberVote-total-votes=Total votes
-pollen.email.creatorEmail.content=You had just created the new poll\: "%s".\nYou can access to this poll by following the links below.\n\nVote page\: \n%s\nEdit page\: \n%s
-pollen.email.creatorEmail.subject=[Pollen] Poll creation (%s)
+pollen.email.createPoll.content=You had just created the new poll\: "%s".\nYou can access to this poll by following the links below.\n\nVote page\: \n%s\nModerate votes page\: \n%s\nEdit page\: \n%s
+pollen.email.createPoll.subject=[Pollen] Poll creation (%s)
+pollen.email.createRestrictedPoll.content=You had just created the new poll\: "%s".\nYou can access to this poll by following the links below.\n\nModerate votes page\: \n%s\nEdit page\: \n%s
+pollen.email.createRestrictedPoll.subject=[Pollen] Restricted poll creation (%s)
pollen.email.lostPassword.content=Hello %1$s. You have just asked for a new password generation for your Pollen account.\n\nLogin\: %2$s\nPassword\: %3$s\n\nYou can now manage your polls by logging on the website \: \n%4$s
pollen.email.lostPassword.subject=[Pollen] Lost password for %s
pollen.email.reminderEmail.content=You have not yet voted for the poll "%s".\nYou can still participate with the identifier %s by following this link\: \n%s
Modified: trunk/pollen-services/src/main/resources/i18n/pollen-services_fr_FR.properties
===================================================================
--- trunk/pollen-services/src/main/resources/i18n/pollen-services_fr_FR.properties 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-services/src/main/resources/i18n/pollen-services_fr_FR.properties 2012-04-30 15:52:29 UTC (rev 3332)
@@ -10,8 +10,8 @@
pollen.common.numberVote-total-votes=Nombre total de votes
pollen.email.createPoll.content=Vous venez de créer le sondage "%1$s".\nVous pouvez y accéder en suivant les liens ci-dessous.\n\nPage de vote \: \n%2$s\nModération des votes \: \n%3$s\nPage de modification \: \n%4$s
pollen.email.createPoll.subject=[Pollen] Création d'un sondage (%1$s)
-pollen.email.creatorEmail.content=Vous venez de créer le sondage "%s".\nVous pouvez y accéder en suivant les liens ci-dessous.\n\nPage de vote \: \n%s\nPage de modification \: \n%s
-pollen.email.creatorEmail.subject=[Pollen] Création d'un sondage (%s)
+pollen.email.createRestrictedPoll.content=Vous venez de créer le sondage "%s".\nVous pouvez y accéder en suivant les liens ci-dessous.\n\nModération des votes \: \n%s\nPage de modification \: \n%s
+pollen.email.createRestrictedPoll.subject=[Pollen] Création d'un sondage restreint (%s)
pollen.email.lostPassword.content=Bonjour %1$s. Vous venez de demander la génération d'un nouveau mot de passe d'accès à votre compte Pollen.\n\nIdentifiant \: %2$s\nMot de passe \: %3$s\n\nVous pouvez dès maintenant gérer vos sondages en vous identifiant sur le site \: \n%4$s
pollen.email.lostPassword.subject=[Pollen] Mot de passe perdu du compte %s
pollen.email.reminderEmail.content=Vous n'avez pas encore voté pour le sondage "%s".\nVous pouvez encore y participer avec l'identifiant %s à l'adresse suivante \: \n%s
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java 2012-04-30 15:52:29 UTC (rev 3332)
@@ -117,6 +117,11 @@
return userAccount != null;
}
+ public boolean isUserAdmin() {
+ UserAccount userAccount = getPollenUserAccount();
+ return userAccount != null && userAccount.isAdministrator();
+ }
+
public static String getApplicationVersion() {
return getPollenApplicationContext().getConfiguration().getVersion().toString();
}
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetCreatedPolls.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetCreatedPolls.java 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetCreatedPolls.java 2012-04-30 15:52:29 UTC (rev 3332)
@@ -94,7 +94,8 @@
);
map.put("id", poll.getTopiaId());
- map.put("voteId", getVoteId(poll));
+ map.put("voteId", poll.getPollId());
+ map.put("moderateId", poll.getAdminId());
map.put("resultId", getResultId(poll));
map.put("adminId", poll.getAdminId());
@@ -107,7 +108,12 @@
protected Set<String> getPollFunctions(Poll poll) {
Set<String> result = Sets.newHashSet();
- result.add("vote");
+ if (PollType.FREE == poll.getPollType()) {
+
+ // only free poll could have vote action because creator can't vote
+ result.add("vote");
+ }
+ result.add("moderate");
result.add("result");
if (!poll.isClosed()) {
@@ -120,17 +126,6 @@
result.add("delete");
return result;
}
-
- protected String getVoteId(Poll poll) {
- String result;
- if (PollType.FREE == poll.getPollType()) {
- result = poll.getPollId();
-
- } else {
- result = poll.getAdminId();
- }
- return result;
- }
/**
* Retrieve the id for result page depends on {@code poll}.
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java 2012-04-30 15:52:29 UTC (rev 3332)
@@ -92,7 +92,7 @@
Poll.PROPERTY_END_DATE
);
map.put("id", poll.getTopiaId());
- map.put("voteId", poll.getAdminId());
+ map.put("moderateId", poll.getAdminId());
map.put("resultId", poll.getAdminId());
map.put("adminId", poll.getAdminId());
@@ -106,7 +106,7 @@
protected Set<String> getPollFunctions(Poll poll) {
Set<String> result = Sets.newHashSet();
- result.add("vote");
+ result.add("moderate");
result.add("result");
if (!poll.isClosed()) {
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractPollForm.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractPollForm.java 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractPollForm.java 2012-04-30 15:52:29 UTC (rev 3332)
@@ -204,9 +204,13 @@
}
public String getPollVoteUrl() {
- return getPollService().getPollVoteUrl(poll).getUrl();
+ return getPollService().getPollVoteUrl(poll, false).getUrl();
}
+ public String getPollModerateUrl() {
+ return getPollService().getPollVoteUrl(poll, true).getUrl();
+ }
+
public String getPollEditUrl() {
return getPollService().getPollEditUrl(poll).getUrl();
}
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java 2012-04-30 15:52:29 UTC (rev 3332)
@@ -371,8 +371,8 @@
return result;
}
- public boolean isModifAllowed(String voteId) {
- return getVoteService().isUpdateAllowed(getPoll(), voteId, getAccountId(), getPollenUserAccount());
+ public boolean isModifAllowed(Vote vote) {
+ return getVoteService().isUpdateAllowed(getPoll(), vote.getTopiaId(), getAccountId(), getPollenUserAccount());
}
public boolean isVoteAllowed() {
@@ -380,8 +380,12 @@
}
public boolean isDeleteCommentAllowed(Comment comment) {
- return isCreatorUser() || getPollCommentService().isCanDeleteComment(comment, getPollAccount(), getPollenUserAccount());
+ return getPollCommentService().isCanDeleteComment(comment, getPollAccount(), getPollenUserAccount());
}
+
+ public boolean isDeleteVoteAllowed(Vote vote) {
+ return isUserAdmin();
+ }
public String escapeLineBreak(String text) {
return text;
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/SavePoll.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/SavePoll.java 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/SavePoll.java 2012-04-30 15:52:29 UTC (rev 3332)
@@ -120,20 +120,6 @@
*/
private Map<Integer, VotingList> votingLists;
- /**
- * This message is used in {@code resume.jsp} to display text before vote
- * page url. For a restricted poll, the message is different because the
- * url contains the creator accountId.
- *
- * @return the message to display to explain vote page url depends on
- * {@code pollType}.
- */
- public String getMessagePollVotePage() {
- String result = isFreePoll() ? _("pollen.label.pollVotePage") :
- _("pollen.label.pollVotePage.restricted");
- return result;
- }
-
@Override
public void prepare() throws Exception {
Modified: trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties
===================================================================
--- trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-04-30 15:52:29 UTC (rev 3332)
@@ -36,6 +36,7 @@
pollen.action.pollDelete=Delete the poll
pollen.action.pollEdit=Edit poll
pollen.action.pollExport=Export poll
+pollen.action.pollModerateVote=Administrate votes
pollen.action.pollPersonToListDelete=Delete this voter
pollen.action.pollResult=Display poll results
pollen.action.pollVote=Vote
@@ -237,10 +238,10 @@
pollen.information.your.are.loggued=You are logged.
pollen.label.contact.administrator=Send an email to an administrator
pollen.label.pollEditPage=The link below leads to the page to modify your poll. Save it to be able to modify your poll later if you need it or to close it \:
+pollen.label.pollModerateVotePage=The link below leads to the page to vote for your poll. This access is available only for you as poll's creator \:
pollen.label.pollRegisterPage=If you are a logged user, you can find these links on the page
pollen.label.pollResultPage=The link below leads to the page to count the votes. Save it to be able to count the vote later \:
pollen.label.pollVotePage=The link below leads to the page to vote for your poll. Save it and send it to the people that you want to vote \:
-pollen.label.pollVotePage.restricted=The link below leads to the page to vote for your poll. This access is available only for you as poll's creator \:
pollen.legend.login=Login
pollen.legend.select.favoriteList.to.add=Sélectionner la liste de favoris à ajouter
pollen.legend.select.personList.to.create.votingList=Sélectionner la liste des votant à importer dans le nouveau groupe
Modified: trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties
===================================================================
--- trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-04-30 15:52:29 UTC (rev 3332)
@@ -38,6 +38,7 @@
pollen.action.pollDelete=Supprimer le sondage
pollen.action.pollEdit=Editer le sondage
pollen.action.pollExport=Exporter le sondage
+pollen.action.pollModerateVote=Administrer les votes
pollen.action.pollPersonToListDelete=Supprimer ce votant
pollen.action.pollResult=Afficher les résultats du sondage
pollen.action.pollVote=Voter
@@ -240,10 +241,10 @@
pollen.information.your.are.loggued=Vous êtes connecté.
pollen.label.contact.administrator=Contacter un administrateur
pollen.label.pollEditPage=Le lien ci-dessous mène à la page de modification du sondage. Enregistrez-le pour pouvoir modifier votre sondage au besoin ou le clore \:
+pollen.label.pollModerateVotePage=Le lien ci-dessous mène à la page de vote. Cet accès n'est valable que pour vous en tant que créateur du sondage \:
pollen.label.pollRegisterPage=Si vous êtes un utilisateur identifié, vous pouvez retrouver ces liens dans la page
pollen.label.pollResultPage=Le lien ci-dessous mène à la page de dépouillement. Enregistrez-le pour pouvoir accéder au dépouillement plus tard \:
pollen.label.pollVotePage=Le lien ci-dessous mène à la page de vote. Enregistrez-le et envoyez-le à ceux que vous voulez voir voter \:
-pollen.label.pollVotePage.restricted=Le lien ci-dessous mène à la page de vote. Cet accès n'est valable que pour vous en tant que créateur du sondage \:
pollen.legend.login=Login
pollen.legend.select.favoriteList.to.add=Sélectionner la liste de favoris à ajouter
pollen.legend.select.personList.to.create.votingList=Sélectionner la liste des votant à importer dans le nouveau groupe
Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/resume.jsp
===================================================================
--- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/resume.jsp 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/resume.jsp 2012-04-30 15:52:29 UTC (rev 3332)
@@ -28,15 +28,28 @@
<h3><s:property value="poll.title"/> <s:text name="pollen.common.by"/>
<s:property value="poll.creator.votingId"/></h3>
+<s:if test="freePoll">
+ <div style="margin-top: 10px;">
+ <img src="<s:url value='/img/vote.png'/>"
+ alt="<s:text name='pollen.common.voteAction'/>"
+ style="margin-right: 18px;"/>
+ <s:property value="pollen.label.pollVotePage"/>
+ <br/>
+ <s:set name="voteUrl" value="%{pollVoteUrl}"/>
+ <s:a href="%{voteUrl}" cssStyle="margin-left:50px;">
+ <s:property value="voteUrl"/>
+ </s:a>
+ </div>
+</s:if>
<div style="margin-top: 10px;">
- <img src="<s:url value='/img/vote.png'/>"
- alt="<s:text name='pollen.common.voteAction'/>"
- style="margin-right: 18px;"/>
- <s:property value="%{messagePollVotePage}"/>
+ <img src="<s:url value='/img/moderate.png'/>"
+ alt="<s:text name='pollen.action.pollModerateVote'/>"
+ style="margin-right: 20px;"/>
+ <s:text name='pollen.label.pollModerateVotePage'/>
<br/>
- <s:set name="voteUrl" value="%{pollVoteUrl}"/>
- <s:a href="%{voteUrl}" cssStyle="margin-left:50px;">
- <s:property value="voteUrl"/>
+ <s:set name="moderateUrl" value="%{pollModerateUrl}"/>
+ <s:a href="%{moderateUrl}" cssStyle="margin-left:50px;">
+ <s:property value="moderateUrl"/>
</s:a>
</div>
<div style="margin-top: 10px;">
Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp
===================================================================
--- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp 2012-04-30 15:52:29 UTC (rev 3332)
@@ -321,7 +321,7 @@
</s:else>
</s:if>
<s:if test="!poll.anonymous">
- <s:if test="isModifAllowed(#vote.topiaId)">
+ <s:if test="isModifAllowed(#vote)">
<s:a action="editVote" namespace="/poll">
<s:param name="pollId" value="%{pollId}"/>
<s:param name="accountId" value="%{#vote.pollAccount.accountId}"/>
@@ -330,7 +330,7 @@
alt="<s:text name="pollen.action.editVote"/>"/>
</s:a>
</s:if>
- <s:if test="creatorUser">
+ <s:if test="isDeleteVoteAllowed(#vote)">
<s:a action="deleteVote" namespace="/poll" href="#"
onclick="return openDeleteVoteDialog('%{#vote.topiaId}');">
<img src="<s:url value="/img/delete.png"/>"
Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollListHelper.jsp
===================================================================
--- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollListHelper.jsp 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollListHelper.jsp 2012-04-30 15:52:29 UTC (rev 3332)
@@ -34,6 +34,9 @@
<s:url id='voteImg' value='/img/vote.png'/>
<s:set id='voteTitle'><s:text name="pollen.action.pollVote"/></s:set>
+<s:url id='moderateImg' value='/img/moderate.png'/>
+<s:set id='moderateTitle'><s:text name="pollen.action.pollModerateVote"/></s:set>
+
<s:url id="resultUrl" action="results/" namespace="/poll"/>
<s:url id='resultImg' value='/img/count.png'/>
<s:set id='resultTitle'><s:text name="pollen.action.pollResult"/></s:set>
@@ -84,6 +87,7 @@
var id = rowObject.pollId;
var voteId = rowObject.voteId;
+ var moderateId = rowObject.moderateId;
var resultId = rowObject.resultId;
var adminId = rowObject.adminId;
@@ -92,6 +96,9 @@
if (cellvalue.indexOf('vote') > -1) {
result += formatLink("${voteUrl}" + voteId, "${voteImg}", "Vote", "${voteTitle}")
}
+ if (cellvalue.indexOf('moderate') > -1) {
+ result += formatLink("${voteUrl}" + moderateId, "${moderateImg}", "Moderate", "${moderateTitle}")
+ }
if (cellvalue.indexOf('result') > -1) {
result += formatLink("${resultUrl}" + resultId, "${resultImg}", "Result", "${resultTitle}")
}
Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/createdList.jsp
===================================================================
--- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/createdList.jsp 2012-04-30 10:45:25 UTC (rev 3331)
+++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/user/createdList.jsp 2012-04-30 15:52:29 UTC (rev 3332)
@@ -55,5 +55,5 @@
<sjg:gridColumn name="beginDate" title='%{getText("pollen.common.beginDate")}'/>
<sjg:gridColumn name="endDate" title='%{getText("pollen.common.endDate")}'/>
<sjg:gridColumn name="functions" title='%{getText("pollen.common.functions")}'
- formatter="pollFunctions" width="180" sortable="false"/>
+ formatter="pollFunctions" width="200" sortable="false"/>
</sjg:grid>
1
0
30 Apr '12
Author: fdesbois
Date: 2012-04-30 12:45:25 +0200 (Mon, 30 Apr 2012)
New Revision: 3331
Url: http://chorem.org/repositories/revision/pollen/3331
Log:
fixes #540 : Add FileAppender and use pollen.log.dir as context path (default to target in maven tomcat6, tomcat7 and jetty embedded modes)
Modified:
trunk/pollen-ui-struts2/pom.xml
trunk/pollen-ui-struts2/src/main/resources/log4j.properties
Modified: trunk/pollen-ui-struts2/pom.xml
===================================================================
--- trunk/pollen-ui-struts2/pom.xml 2012-04-30 10:45:20 UTC (rev 3330)
+++ trunk/pollen-ui-struts2/pom.xml 2012-04-30 10:45:25 UTC (rev 3331)
@@ -246,6 +246,10 @@
<name>siteUrl</name>
<value>http://localhost:8080/pollen</value>
</systemProperty>
+ <systemProperty>
+ <name>pollen.log.dir</name>
+ <value>target</value>
+ </systemProperty>
</systemProperties>
</configuration>
</plugin>
@@ -257,6 +261,7 @@
<path>/pollen</path>
<systemProperties>
<siteUrl>http://localhost:8080/pollen</siteUrl>
+ <pollen.log.dir>target</pollen.log.dir>
</systemProperties>
<uriEncoding>UTF-8</uriEncoding>
</configuration>
@@ -269,6 +274,7 @@
<path>/pollen</path>
<systemProperties>
<siteUrl>http://localhost:8080/pollen</siteUrl>
+ <pollen.log.dir>target</pollen.log.dir>
</systemProperties>
<uriEncoding>UTF-8</uriEncoding>
</configuration>
Modified: trunk/pollen-ui-struts2/src/main/resources/log4j.properties
===================================================================
--- trunk/pollen-ui-struts2/src/main/resources/log4j.properties 2012-04-30 10:45:20 UTC (rev 3330)
+++ trunk/pollen-ui-struts2/src/main/resources/log4j.properties 2012-04-30 10:45:25 UTC (rev 3331)
@@ -21,7 +21,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# #L%
###
-log4j.rootCategory=ERROR, console
+log4j.rootCategory=ERROR, console, file
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
@@ -30,3 +30,11 @@
log4j.logger.org.chorem.pollen=INFO
log4j.logger.org.chorem.pollen.ui.PollenShiroIsAdministratorFilter=DEBUG
log4j.logger.org.nuiton=INFO
+
+# FileAppender : need to have pollen.log.dir in system properties at application startup
+log4j.appender.file=org.apache.log4j.RollingFileAppender
+log4j.appender.file.File=${pollen.log.dir}/pollen.log
+log4j.appender.file.MaxFileSize=10MB
+log4j.appender.file.MaxBackupIndex=4
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d{yyyy/MM/dd hh:mm:ss} %5p (%F:%L) %m%n
1
0
r3330 - trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/security
by fdesbois@users.chorem.org 30 Apr '12
by fdesbois@users.chorem.org 30 Apr '12
30 Apr '12
Author: fdesbois
Date: 2012-04-30 12:45:20 +0200 (Mon, 30 Apr 2012)
New Revision: 3330
Url: http://chorem.org/repositories/revision/pollen/3330
Log:
#535 : publicResults check is not necessary for an admin or the poll creator
Modified:
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/security/ResultAccessRequired.java
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/security/ResultAccessRequired.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/security/ResultAccessRequired.java 2012-04-30 10:45:14 UTC (rev 3329)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/security/ResultAccessRequired.java 2012-04-30 10:45:20 UTC (rev 3330)
@@ -39,9 +39,15 @@
private static final Log log =
LogFactory.getLog(ResultAccessRequired.class);
+ protected final AdminUserRequired adminFilter;
+
+ protected final PollCreatorRequired pollCreatorFilter;
+
protected final PollAccessRequired pollAccountFilter;
public ResultAccessRequired() {
+ adminFilter = new AdminUserRequired();
+ pollCreatorFilter = new PollCreatorRequired();
pollAccountFilter = new PollAccessRequired();
}
@@ -52,9 +58,20 @@
boolean isAccessAllowed;
- // Must be a valid user
- if (pollAccountFilter.isAccessAllowed(request, response, mappedValue)) {
+ if (adminFilter.isAccessAllowed(request, response, mappedValue)) {
+ // user is connected ans admin, so
+ isAccessAllowed = true;
+
+ }
+ else if (pollCreatorFilter.isAccessAllowed(request, response, mappedValue)) {
+
+ // account is creator
+ isAccessAllowed = true;
+
+ }
+ else if (pollAccountFilter.isAccessAllowed(request, response, mappedValue)) {
+
PollUri pollUri = getPollUri(request);
PollenServiceContext serviceContext =
@@ -82,7 +99,8 @@
isAccessAllowed = false;
}
- } else {
+ }
+ else {
isAccessAllowed = false;
}
1
0
r3329 - in trunk: pollen-persistence/src/main/java/org/chorem/pollen/business/persistence pollen-services/src/main/java/org/chorem/pollen/services/impl pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json pollen-ui-struts2/src/main/webapp/WEB-INF/jsp
by fdesbois@users.chorem.org 30 Apr '12
by fdesbois@users.chorem.org 30 Apr '12
30 Apr '12
Author: fdesbois
Date: 2012-04-30 12:45:14 +0200 (Mon, 30 Apr 2012)
New Revision: 3329
Url: http://chorem.org/repositories/revision/pollen/3329
Log:
fixes #539 :
- repair problem with id for result page
- improve polls loading and retrieve also PollAccount for participated and invited cases
Modified:
trunk/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollDAOImpl.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetCreatedPolls.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetInvitedPolls.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetParticipatedPolls.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java
trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollListHelper.jsp
Modified: trunk/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollDAOImpl.java
===================================================================
--- trunk/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollDAOImpl.java 2012-04-27 10:24:54 UTC (rev 3328)
+++ trunk/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollDAOImpl.java 2012-04-30 10:45:14 UTC (rev 3329)
@@ -24,7 +24,7 @@
package org.chorem.pollen.business.persistence;
import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.pollen.entities.PollenDAOHelper;
@@ -33,6 +33,7 @@
import org.nuiton.topia.persistence.TopiaFilterPagerUtil;
import java.util.List;
+import java.util.Map;
public class PollDAOImpl<E extends Poll> extends PollDAOAbstract<E> {
@@ -71,8 +72,9 @@
return result;
}
- public List<E> getInvitedPolls(TopiaFilterPagerUtil.FilterPagerBean pager,
- UserAccount userToUse) throws TopiaException {
+ public Map<Poll, PollAccount> getInvitedPolls(
+ TopiaFilterPagerUtil.FilterPagerBean pager,
+ UserAccount userToUse) throws TopiaException {
Preconditions.checkNotNull(pager);
Preconditions.checkNotNull(userToUse);
@@ -80,33 +82,47 @@
//FIXME Use a query to do this to avoid in memory pagination
String email = userToUse.getEmail();
- List<E> polls = findAll();
- List<E> allPolls = Lists.newLinkedList();
- for (E poll : polls) {
- for (VotingList votingList : poll.getVotingList()) {
- for (PersonToList personToList : votingList
- .getPollAccountPersonToList()) {
- if (!personToList.isHasVoted()) {
- PollAccount pollAccount = personToList
- .getPollAccount();
+ TopiaQuery countQuery = createQuery("p");
+ countQuery.addLeftJoin("p." + Poll.PROPERTY_VOTING_LIST, "v", false);
+ countQuery.addLeftJoin("v." + VotingList.PROPERTY_POLL_ACCOUNT_PERSON_TO_LIST, "l", false);
+ countQuery.addEquals("l." + PersonToList.PROPERTY_POLL_ACCOUNT
+ + "." + PollAccount.PROPERTY_EMAIL, email);
+ long records = countByQuery(countQuery);
+ pager.setRecords((int) records);
+
+ TopiaQuery query = TopiaFilterPagerUtil.addPagerToQuery(countQuery, pager);
- if (pollAccount != null
- && pollAccount.getEmail() != null
- && pollAccount.getEmail().equals(
- email)) {
- allPolls.add(poll);
- }
- }
- }
- }
- }
+ return findAllWithPollAccounts(query,
+ "p",
+ "l." + PersonToList.PROPERTY_POLL_ACCOUNT);
- int records = allPolls.size();
- pager.setRecords(records);
+// List<E> polls = findAll();
+// List<E> allPolls = Lists.newLinkedList();
+// for (E poll : polls) {
+// for (VotingList votingList : poll.getVotingList()) {
+// for (PersonToList personToList : votingList
+// .getPollAccountPersonToList()) {
+// if (!personToList.isHasVoted()) {
+// PollAccount pollAccount = personToList
+// .getPollAccount();
+//
+// if (pollAccount != null
+// && pollAccount.getEmail() != null
+// && pollAccount.getEmail().equals(
+// email)) {
+// allPolls.add(poll);
+// }
+// }
+// }
+// }
+// }
+//
+// int records = allPolls.size();
+// pager.setRecords(records);
+//
+// List<E> result = TopiaFilterPagerUtil.getPageFromList(allPolls, pager);
+// return result;
- List<E> result = TopiaFilterPagerUtil.getPageFromList(allPolls, pager);
- return result;
-
// try {
// PollDAO dao = PollenDAOHelper.getPollDAO(getTransaction());
// TopiaQuery countQuery = dao.createQuery("e");
@@ -126,8 +142,9 @@
// }
}
- public List<E> getParticipatedPolls(TopiaFilterPagerUtil.FilterPagerBean pager,
- UserAccount userToUse) throws TopiaException {
+ public Map<Poll, PollAccount> getParticipatedPolls(
+ TopiaFilterPagerUtil.FilterPagerBean pager,
+ UserAccount userToUse) throws TopiaException {
Preconditions.checkNotNull(pager);
Preconditions.checkNotNull(userToUse);
@@ -144,9 +161,27 @@
TopiaQuery query = TopiaFilterPagerUtil.addPagerToQuery(countQuery, pager);
- List<E> result = findAllByQuery(query);
+ return findAllWithPollAccounts(query,
+ "e." + Vote.PROPERTY_POLL,
+ "e." + Vote.PROPERTY_POLL_ACCOUNT);
+ }
+
+ protected Map<Poll, PollAccount> findAllWithPollAccounts(TopiaQuery query,
+ String pollAlias,
+ String pollAccountAlias)
+ throws TopiaException {
+
+ // Select both poll and pollAccount
+ query.setSelect(pollAlias, pollAccountAlias);
+
+ List<Object[]> queryResults = getContext().findByQuery(query);
+ Map<Poll, PollAccount> result = Maps.newLinkedHashMap();
+ for (Object[] row : queryResults) {
+ Poll poll = (Poll) row[0];
+ PollAccount pollAccount = (PollAccount) row[1];
+ result.put(poll, pollAccount);
+ }
return result;
-
}
public List<E> getRunningPolls(boolean withEndDate) throws TopiaException {
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java 2012-04-27 10:24:54 UTC (rev 3328)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollService.java 2012-04-30 10:45:14 UTC (rev 3329)
@@ -467,8 +467,9 @@
}
}
- public List<Poll> getInvitedPolls(TopiaFilterPagerUtil.FilterPagerBean pager,
- UserAccount user) {
+ public Map<Poll, PollAccount> getInvitedPolls(
+ TopiaFilterPagerUtil.FilterPagerBean pager,
+ UserAccount user) {
Preconditions.checkNotNull(pager);
Preconditions.checkNotNull(user);
@@ -480,7 +481,8 @@
Preconditions.checkNotNull(userToUse);
try {
PollDAO pollDao = getDAO(Poll.class);
- List<Poll> result = pollDao.getInvitedPolls(pager, userToUse);
+ Map<Poll, PollAccount> result =
+ pollDao.getInvitedPolls(pager, userToUse);
return result;
} catch (TopiaException e) {
throw new PollenTechnicalException("Could not obtain invited polls", e);
@@ -505,8 +507,9 @@
// }
}
- public List<Poll> getParticipatedPolls(TopiaFilterPagerUtil.FilterPagerBean pager,
- UserAccount user) {
+ public Map<Poll, PollAccount> getParticipatedPolls(
+ TopiaFilterPagerUtil.FilterPagerBean pager,
+ UserAccount user) {
Preconditions.checkNotNull(pager);
Preconditions.checkNotNull(user);
@@ -519,7 +522,8 @@
try {
PollDAO pollDao = getDAO(Poll.class);
- List<Poll> result = pollDao.getParticipatedPolls(pager, userToUse);
+ Map<Poll, PollAccount> result =
+ pollDao.getParticipatedPolls(pager, userToUse);
return result;
} catch (TopiaException e) {
throw new PollenTechnicalException("Could not obtain running polls", e);
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetCreatedPolls.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetCreatedPolls.java 2012-04-27 10:24:54 UTC (rev 3328)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetCreatedPolls.java 2012-04-30 10:45:14 UTC (rev 3329)
@@ -25,6 +25,7 @@
import com.google.common.collect.Sets;
import org.chorem.pollen.business.persistence.Poll;
+import org.chorem.pollen.common.PollType;
import org.chorem.pollen.entities.PollenBinderHelper;
import org.chorem.pollen.services.impl.PollService;
import org.nuiton.util.beans.Binder;
@@ -91,8 +92,12 @@
Poll.PROPERTY_BEGIN_DATE,
Poll.PROPERTY_END_DATE
);
+
map.put("id", poll.getTopiaId());
+ map.put("voteId", getVoteId(poll));
+ map.put("resultId", getResultId(poll));
map.put("adminId", poll.getAdminId());
+
Set<String> functions = getPollFunctions(poll);
map.put("functions", functions);
polls[index++] = map;
@@ -115,4 +120,34 @@
result.add("delete");
return result;
}
+
+ protected String getVoteId(Poll poll) {
+ String result;
+ if (PollType.FREE == poll.getPollType()) {
+ result = poll.getPollId();
+
+ } else {
+ result = poll.getAdminId();
+ }
+ return result;
+ }
+
+ /**
+ * Retrieve the id for result page depends on {@code poll}.
+ * It's not necessary to use {@code adminId} if the poll results are public.
+ * But the {@code adminId} is mandatory if the poll is restricted (security).
+ *
+ * @param poll Poll
+ * @return the pollId if results are public or the adminId if not
+ */
+ protected String getResultId(Poll poll) {
+ String result;
+ if (PollType.FREE == poll.getPollType() && poll.isPublicResults()) {
+ result = poll.getPollId();
+
+ } else {
+ result = poll.getAdminId();
+ }
+ return result;
+ }
}
\ No newline at end of file
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetInvitedPolls.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetInvitedPolls.java 2012-04-27 10:24:54 UTC (rev 3328)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetInvitedPolls.java 2012-04-30 10:45:14 UTC (rev 3329)
@@ -24,15 +24,13 @@
package org.chorem.pollen.ui.actions.json;
import com.google.common.collect.Sets;
-import org.chorem.pollen.business.persistence.PersonToList;
+import org.chorem.pollen.bean.PollUri;
import org.chorem.pollen.business.persistence.Poll;
import org.chorem.pollen.business.persistence.PollAccount;
-import org.chorem.pollen.business.persistence.VotingList;
import org.chorem.pollen.entities.PollenBinderHelper;
import org.chorem.pollen.services.impl.PollService;
import org.nuiton.util.beans.Binder;
-import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -77,15 +75,16 @@
PollService pollService = newService(PollService.class);
- List<Poll> pollList = pollService.getInvitedPolls(pager,
+ Map<Poll, PollAccount> invitedPolls = pollService.getInvitedPolls(pager,
getPollenUserAccount());
- polls = new Map[pollList.size()];
+ polls = new Map[invitedPolls.size()];
Binder<Poll, Poll> binder =
PollenBinderHelper.getSimpleTopiaBinder(Poll.class);
int index = 0;
- for (Poll poll : pollList) {
+ for (Map.Entry<Poll, PollAccount> entry : invitedPolls.entrySet()) {
+ Poll poll = entry.getKey();
Map<String, Object> map = binder.obtainProperties(
poll,
Poll.PROPERTY_TITLE,
@@ -94,10 +93,15 @@
Poll.PROPERTY_BEGIN_DATE,
Poll.PROPERTY_END_DATE
);
- String userEmail = getPollenUserAccount().getEmail();
- map.put("adminId", poll.getAdminId());
- map.put("voteId", getVoteId(poll, userEmail));
+
+ PollAccount account = entry.getValue();
+
+ PollUri pollUri = PollUri.newPollUri(poll.getPollId(), account.getAccountId());
+
map.put("id", poll.getTopiaId());
+ map.put("voteId", pollUri.getUri());
+ map.put("resultId", pollUri.getUri());
+
Set<String> functions = getPollFunctions(poll);
map.put("functions", functions);
polls[index++] = map;
@@ -115,19 +119,4 @@
}
return result;
}
-
- protected String getVoteId(Poll poll, String userEmail) {
- String result = poll.getPollId();
- for (VotingList list : poll.getVotingList()) {
- for (PersonToList account : list.getPollAccountPersonToList()) {
- PollAccount pollAccount = account.getPollAccount();
- if (userEmail.equals(pollAccount.getEmail())) {
- result += ":" + pollAccount.getAccountId();
- break;
- }
- }
- }
-
- return result;
- }
}
\ No newline at end of file
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetParticipatedPolls.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetParticipatedPolls.java 2012-04-27 10:24:54 UTC (rev 3328)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetParticipatedPolls.java 2012-04-30 10:45:14 UTC (rev 3329)
@@ -24,12 +24,14 @@
package org.chorem.pollen.ui.actions.json;
import com.google.common.collect.Sets;
+import org.chorem.pollen.bean.PollUri;
import org.chorem.pollen.business.persistence.Poll;
+import org.chorem.pollen.business.persistence.PollAccount;
+import org.chorem.pollen.common.PollType;
import org.chorem.pollen.entities.PollenBinderHelper;
import org.chorem.pollen.services.impl.PollService;
import org.nuiton.util.beans.Binder;
-import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -74,15 +76,16 @@
PollService pollService = newService(PollService.class);
- List<Poll> pollList = pollService.getParticipatedPolls(
- pager, getPollenUserAccount());
+ Map<Poll, PollAccount> participatedPolls =
+ pollService.getParticipatedPolls(pager, getPollenUserAccount());
- polls = new Map[pollList.size()];
+ polls = new Map[participatedPolls.size()];
Binder<Poll, Poll> binder =
PollenBinderHelper.getSimpleTopiaBinder(Poll.class);
int index = 0;
- for (Poll poll : pollList) {
+ for (Map.Entry<Poll, PollAccount> entry : participatedPolls.entrySet()) {
+ Poll poll = entry.getKey();
Map<String, Object> map = binder.obtainProperties(
poll,
Poll.PROPERTY_TITLE,
@@ -91,7 +94,22 @@
Poll.PROPERTY_BEGIN_DATE,
Poll.PROPERTY_END_DATE
);
+
+ PollAccount account = entry.getValue();
+
+ PollUri pollUri = PollUri.newPollUri(poll.getPollId(), account.getAccountId());
+
map.put("id", poll.getTopiaId());
+
+ // Keep accountId to allow vote update
+ map.put("voteId", pollUri.getUri());
+
+ // For Free poll, it's not necessary to keep the accountId
+ String resultId = poll.getPollType() == PollType.FREE
+ ? pollUri.getPollId()
+ : pollUri.getUri();
+ map.put("resultId", resultId);
+
Set<String> functions = getPollFunctions(poll);
map.put("functions", functions);
polls[index++] = map;
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java 2012-04-27 10:24:54 UTC (rev 3328)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java 2012-04-30 10:45:14 UTC (rev 3329)
@@ -92,7 +92,10 @@
Poll.PROPERTY_END_DATE
);
map.put("id", poll.getTopiaId());
+ map.put("voteId", poll.getAdminId());
+ map.put("resultId", poll.getAdminId());
map.put("adminId", poll.getAdminId());
+
Set<String> functions = getPollFunctions(poll);
map.put("functions", functions);
polls[index++] = map;
Modified: trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollListHelper.jsp
===================================================================
--- trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollListHelper.jsp 2012-04-27 10:24:54 UTC (rev 3328)
+++ trunk/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollListHelper.jsp 2012-04-30 10:45:14 UTC (rev 3329)
@@ -83,19 +83,17 @@
function pollFunctions(cellvalue, options, rowObject) {
var id = rowObject.pollId;
+ var voteId = rowObject.voteId;
+ var resultId = rowObject.resultId;
var adminId = rowObject.adminId;
var result = "";
- if (rowObject['voteId']) {
- id = rowObject['voteId'];
- }
-
if (cellvalue.indexOf('vote') > -1) {
- result += formatLink("${voteUrl}" + id, "${voteImg}", "Vote", "${voteTitle}")
+ result += formatLink("${voteUrl}" + voteId, "${voteImg}", "Vote", "${voteTitle}")
}
if (cellvalue.indexOf('result') > -1) {
- result += formatLink("${resultUrl}" + adminId, "${resultImg}", "Result", "${resultTitle}")
+ result += formatLink("${resultUrl}" + resultId, "${resultImg}", "Result", "${resultTitle}")
}
if (cellvalue.indexOf('edit') > -1) {
result += formatLink("${editUrl}" + adminId, "${editImg}", "Edit", "${editTitle}")
1
0
r3328 - in trunk: pollen-services/src/main/java/org/chorem/pollen/services/impl pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll pollen-ui-struts2/src/main/resources/i18n
by fdesbois@users.chorem.org 27 Apr '12
by fdesbois@users.chorem.org 27 Apr '12
27 Apr '12
Author: fdesbois
Date: 2012-04-27 12:24:54 +0200 (Fri, 27 Apr 2012)
New Revision: 3328
Url: http://chorem.org/repositories/revision/pollen/3328
Log:
fixes #533 :
- comment author must be the connecter user if exists
- improve creator treatment, the creator can't vote when identified by token (pollUid:creatorAccountUid)
Modified:
trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/VoteService.java
trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java
trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties
trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/VoteService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/VoteService.java 2012-04-26 18:29:22 UTC (rev 3327)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/VoteService.java 2012-04-27 10:24:54 UTC (rev 3328)
@@ -362,7 +362,8 @@
* poll. The account must be defined previously using
* {@link PollService#getPollAccountEditable(String, UserAccount, Poll)} to
* have a proper link between userAccount and pollAccount even if not already
- * created in dabase.
+ * created in dabase. The poll creator can't vote. The token is just use
+ * for moderate purpose.
*
* @param poll Poll
* @param accountEditable Account to check
@@ -374,15 +375,24 @@
Preconditions.checkNotNull(accountEditable);
Date now = serviceContext.getCurrentTime();
-
- boolean result = poll.isRunning(now);
- if (poll.getPollType() != PollType.FREE) {
- PersonToListDAO personToListDAO = getDAO(PersonToList.class);
- PersonToList personToList = personToListDAO.findByPollAndAccount(poll, accountEditable);
+ boolean result;
+ if (poll.getCreator().equals(accountEditable)) {
- result &= personToList != null;
- }
+ // The creator user can't vote
+ result = false;
+ } else {
+
+ // The poll must be running and account allowed for restricted poll
+ result = poll.isRunning(now);
+ if (poll.getPollType() != PollType.FREE) {
+
+ PersonToListDAO personToListDAO = getDAO(PersonToList.class);
+ PersonToList personToList = personToListDAO.findByPollAndAccount(poll, accountEditable);
+
+ result &= personToList != null;
+ }
+ }
return result;
}
Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java
===================================================================
--- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java 2012-04-26 18:29:22 UTC (rev 3327)
+++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/AbstractVoteAction.java 2012-04-27 10:24:54 UTC (rev 3328)
@@ -34,6 +34,7 @@
import org.chorem.pollen.business.persistence.Comment;
import org.chorem.pollen.business.persistence.Poll;
import org.chorem.pollen.business.persistence.PollAccount;
+import org.chorem.pollen.business.persistence.UserAccount;
import org.chorem.pollen.business.persistence.Vote;
import org.chorem.pollen.business.persistence.VoteToChoice;
import org.chorem.pollen.common.ChoiceType;
@@ -256,8 +257,18 @@
public String getCommentAuthor() {
if (commentAuthor == null) {
- // Use current pollAccount name for comment
- commentAuthor = getPollAccount().getVotingId();
+
+ UserAccount user = getPollenUserAccount();
+ if (user == null) {
+
+ // Use current pollAccount name for comment
+ commentAuthor = getPollAccount().getVotingId();
+
+ } else {
+
+ // Connecter user name
+ commentAuthor = user.getDisplayName();
+ }
}
return commentAuthor;
}
@@ -289,11 +300,19 @@
PollFeedService pollFeedService = newService(PollFeedService.class);
feedFileExisting = pollFeedService.isFeedExists(poll);
+
+ PollAccount pollCreator = poll.getCreator();
+ if (getPollenUserAccount() == null) {
- //TODO Deal the case of the not loggued poll (using the pollAccountId
- creatorUser = getPollenUserAccount() != null &&
- getPollenUserAccount().equals(poll.getCreator().getUserAccount());
+ // User is creator if loaded pollAccount is the creator
+ creatorUser = pollCreator.equals(pollAccount);
+
+ } else {
+ // User is creator if the userAccount is the same
+ creatorUser = getPollenUserAccount().equals(pollCreator.getUserAccount());
+ }
+
// Messages
if (poll.isClosed()) {
addActionMessage(_("pollen.information.pollClosed"));
@@ -301,6 +320,8 @@
addActionMessage(_("pollen.information.pollNotStarted"));
} else if (isPollFinished()) {
addActionMessage(_("pollen.information.pollFinished"));
+ } else if (pollCreator.equals(pollAccount)) {
+ addActionMessage(_("pollen.information.vote.creatorUser"));
}
if (isPollChoiceRunning()) {
addActionMessage(_("pollen.information.pollChoiceRunning"));
Modified: trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties
===================================================================
--- trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-04-26 18:29:22 UTC (rev 3327)
+++ trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-04-27 10:24:54 UTC (rev 3328)
@@ -233,6 +233,7 @@
pollen.information.user.updated=User %s updated.
pollen.information.vote.created=Vote saved
pollen.information.vote.createdWithUpdateUrl=Vote saved, you can modify it using this address \: <br/> <a href\="%1$s">%1$s</a>
+pollen.information.vote.creatorUser=You are identified as the poll's creator. You can't vote with this URL.
pollen.information.your.are.loggued=You are logged.
pollen.label.contact.administrator=Send an email to an administrator
pollen.label.pollEditPage=The link below leads to the page to modify your poll. Save it to be able to modify your poll later if you need it or to close it \:
Modified: trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties
===================================================================
--- trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-04-26 18:29:22 UTC (rev 3327)
+++ trunk/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-04-27 10:24:54 UTC (rev 3328)
@@ -236,6 +236,7 @@
pollen.information.user.updated=L'utilisateur %s a été mis à jour.
pollen.information.vote.created=Vote enregistré
pollen.information.vote.createdWithUpdateUrl=Vote enregistré, vous pourrez le modifier à l'adresse suivante \: <br/> <a href\="%1$s">%1$s</a>
+pollen.information.vote.creatorUser=Vous êtes identifié comme le créateur du sondage. Vous ne pouvez pas voter avec cette URL.
pollen.information.your.are.loggued=Vous êtes connecté.
pollen.label.contact.administrator=Contacter un administrateur
pollen.label.pollEditPage=Le lien ci-dessous mène à la page de modification du sondage. Enregistrez-le pour pouvoir modifier votre sondage au besoin ou le clore \:
1
0
r3327 - in trunk: . pollen-persistence pollen-services pollen-ui-struts2 pollen-votecounting
by maven-release@users.chorem.org 26 Apr '12
by maven-release@users.chorem.org 26 Apr '12
26 Apr '12
Author: maven-release
Date: 2012-04-26 20:29:22 +0200 (Thu, 26 Apr 2012)
New Revision: 3327
Url: http://chorem.org/repositories/revision/pollen/3327
Log:
[maven-release-plugin] prepare for next development iteration
Modified:
trunk/pollen-persistence/pom.xml
trunk/pollen-services/pom.xml
trunk/pollen-ui-struts2/pom.xml
trunk/pollen-votecounting/pom.xml
trunk/pom.xml
Modified: trunk/pollen-persistence/pom.xml
===================================================================
--- trunk/pollen-persistence/pom.xml 2012-04-26 18:29:19 UTC (rev 3326)
+++ trunk/pollen-persistence/pom.xml 2012-04-26 18:29:22 UTC (rev 3327)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>pollen</artifactId>
- <version>1.3-rc3</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<groupId>org.chorem.pollen</groupId>
Modified: trunk/pollen-services/pom.xml
===================================================================
--- trunk/pollen-services/pom.xml 2012-04-26 18:29:19 UTC (rev 3326)
+++ trunk/pollen-services/pom.xml 2012-04-26 18:29:22 UTC (rev 3327)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>pollen</artifactId>
- <version>1.3-rc3</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<groupId>org.chorem.pollen</groupId>
Modified: trunk/pollen-ui-struts2/pom.xml
===================================================================
--- trunk/pollen-ui-struts2/pom.xml 2012-04-26 18:29:19 UTC (rev 3326)
+++ trunk/pollen-ui-struts2/pom.xml 2012-04-26 18:29:22 UTC (rev 3327)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>pollen</artifactId>
- <version>1.3-rc3</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<groupId>org.chorem.pollen</groupId>
Modified: trunk/pollen-votecounting/pom.xml
===================================================================
--- trunk/pollen-votecounting/pom.xml 2012-04-26 18:29:19 UTC (rev 3326)
+++ trunk/pollen-votecounting/pom.xml 2012-04-26 18:29:22 UTC (rev 3327)
@@ -6,7 +6,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>pollen</artifactId>
- <version>1.3-rc3</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<groupId>org.chorem.pollen</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-04-26 18:29:19 UTC (rev 3326)
+++ trunk/pom.xml 2012-04-26 18:29:22 UTC (rev 3327)
@@ -15,7 +15,7 @@
<groupId>org.chorem</groupId>
<artifactId>pollen</artifactId>
- <version>1.3-rc3</version>
+ <version>1.3-SNAPSHOT</version>
<modules>
<module>pollen-votecounting</module>
@@ -530,11 +530,11 @@
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:http://svn.chorem.org/svn/pollen/tags/pollen-1.3-rc3</connection>
+ <connection>scm:svn:http://svn.chorem.org/svn/pollen/trunk</connection>
<developerConnection>
- scm:svn:http://svn.chorem.org/svn/pollen/tags/pollen-1.3-rc3
+ scm:svn:http://svn.chorem.org/svn/pollen/trunk
</developerConnection>
- <url>http://www.chorem.org/repositories/browse/pollen/tags/pollen-1.3-rc3</url>
+ <url>http://www.chorem.org/repositories/browse/pollen/trunk</url>
</scm>
<distributionManagement>
1
0
Author: maven-release
Date: 2012-04-26 20:29:19 +0200 (Thu, 26 Apr 2012)
New Revision: 3326
Url: http://chorem.org/repositories/revision/pollen/3326
Log:
[maven-release-plugin] copy for tag pollen-1.3-rc3
Added:
tags/pollen-1.3-rc3/
Property changes on: tags/pollen-1.3-rc3
___________________________________________________________________
Added: svn:ignore
+ target
nbactions.xml
.settings
.classpath
.project
*.ipr
*.iws
*.iml
.idea
Added: svn:mergeinfo
+
1
0
r3325 - in trunk: . pollen-persistence pollen-services pollen-ui-struts2 pollen-votecounting
by maven-release@users.chorem.org 26 Apr '12
by maven-release@users.chorem.org 26 Apr '12
26 Apr '12
Author: maven-release
Date: 2012-04-26 20:29:14 +0200 (Thu, 26 Apr 2012)
New Revision: 3325
Url: http://chorem.org/repositories/revision/pollen/3325
Log:
[maven-release-plugin] prepare release pollen-1.3-rc3
Modified:
trunk/pollen-persistence/pom.xml
trunk/pollen-services/pom.xml
trunk/pollen-ui-struts2/pom.xml
trunk/pollen-votecounting/pom.xml
trunk/pom.xml
Modified: trunk/pollen-persistence/pom.xml
===================================================================
--- trunk/pollen-persistence/pom.xml 2012-04-26 16:00:51 UTC (rev 3324)
+++ trunk/pollen-persistence/pom.xml 2012-04-26 18:29:14 UTC (rev 3325)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>pollen</artifactId>
- <version>1.4-SNAPSHOT</version>
+ <version>1.3-rc3</version>
</parent>
<groupId>org.chorem.pollen</groupId>
Modified: trunk/pollen-services/pom.xml
===================================================================
--- trunk/pollen-services/pom.xml 2012-04-26 16:00:51 UTC (rev 3324)
+++ trunk/pollen-services/pom.xml 2012-04-26 18:29:14 UTC (rev 3325)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>pollen</artifactId>
- <version>1.4-SNAPSHOT</version>
+ <version>1.3-rc3</version>
</parent>
<groupId>org.chorem.pollen</groupId>
Modified: trunk/pollen-ui-struts2/pom.xml
===================================================================
--- trunk/pollen-ui-struts2/pom.xml 2012-04-26 16:00:51 UTC (rev 3324)
+++ trunk/pollen-ui-struts2/pom.xml 2012-04-26 18:29:14 UTC (rev 3325)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>pollen</artifactId>
- <version>1.4-SNAPSHOT</version>
+ <version>1.3-rc3</version>
</parent>
<groupId>org.chorem.pollen</groupId>
Modified: trunk/pollen-votecounting/pom.xml
===================================================================
--- trunk/pollen-votecounting/pom.xml 2012-04-26 16:00:51 UTC (rev 3324)
+++ trunk/pollen-votecounting/pom.xml 2012-04-26 18:29:14 UTC (rev 3325)
@@ -6,7 +6,7 @@
<parent>
<groupId>org.chorem</groupId>
<artifactId>pollen</artifactId>
- <version>1.4-SNAPSHOT</version>
+ <version>1.3-rc3</version>
</parent>
<groupId>org.chorem.pollen</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-04-26 16:00:51 UTC (rev 3324)
+++ trunk/pom.xml 2012-04-26 18:29:14 UTC (rev 3325)
@@ -15,7 +15,7 @@
<groupId>org.chorem</groupId>
<artifactId>pollen</artifactId>
- <version>1.4-SNAPSHOT</version>
+ <version>1.3-rc3</version>
<modules>
<module>pollen-votecounting</module>
@@ -530,11 +530,11 @@
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:http://svn.chorem.org/svn/pollen/trunk</connection>
+ <connection>scm:svn:http://svn.chorem.org/svn/pollen/tags/pollen-1.3-rc3</connection>
<developerConnection>
- scm:svn:http://svn.chorem.org/svn/pollen/trunk
+ scm:svn:http://svn.chorem.org/svn/pollen/tags/pollen-1.3-rc3
</developerConnection>
- <url>http://www.chorem.org/repositories/browse/pollen/trunk</url>
+ <url>http://www.chorem.org/repositories/browse/pollen/tags/pollen-1.3-rc3</url>
</scm>
<distributionManagement>
1
0
Author: fdesbois
Date: 2012-04-26 18:00:51 +0200 (Thu, 26 Apr 2012)
New Revision: 3324
Url: http://chorem.org/repositories/revision/pollen/3324
Log:
Delete bad version tag
Removed:
tags/pollen-1.3/
1
0