r3631 - trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl
Author: tchemit Date: 2012-08-26 18:34:10 +0200 (Sun, 26 Aug 2012) New Revision: 3631 Url: http://chorem.org/repositories/revision/pollen/3631 Log: refs #746: Improve security model (check accountId exists when in url Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/SecurityService.java Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/SecurityService.java =================================================================== --- trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/SecurityService.java 2012-08-26 16:33:47 UTC (rev 3630) +++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/SecurityService.java 2012-08-26 16:34:10 UTC (rev 3631) @@ -539,4 +539,21 @@ "from poll '" + pollId + "'", e); } } + + public boolean isAccountExist(String accountId) { + + try { + + PollAccountDAO dao = getDAO(PollAccount.class); + + PollAccount result = dao.findByAccountId(accountId); + + return result != null; + + } catch (TopiaException e) { + throw new PollenTechnicalException( + "Could not check pollAccount existence " + + "from account '" + accountId + "'", e); + } + } }
participants (1)
-
tchemit@users.chorem.org