branch develop updated (dc16b42e -> 5f7a295f)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from dc16b42e mise en place du gitlab-page pour la documentation utilisateur (ref #88) new 5f7a295f correction de l'initialisation de la base de données The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 5f7a295f733566d2fa80f411ef1f1c9e0a4e3ca6 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Oct 20 14:06:20 2017 +0200 correction de l'initialisation de la base de données Summary of changes: .../rest/api/PollenRestApiApplicationContext.java | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 5f7a295f733566d2fa80f411ef1f1c9e0a4e3ca6 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Oct 20 14:06:20 2017 +0200 correction de l'initialisation de la base de données --- .../rest/api/PollenRestApiApplicationContext.java | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiApplicationContext.java b/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiApplicationContext.java index 3aa6796c..905575ff 100644 --- a/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiApplicationContext.java +++ b/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiApplicationContext.java @@ -28,10 +28,12 @@ import org.apache.log4j.LogManager; import org.apache.log4j.PropertyConfigurator; import org.apache.shiro.SecurityUtils; import org.apache.shiro.mgt.DefaultSecurityManager; +import org.apache.shiro.subject.Subject; import org.chorem.pollen.persistence.PollenPersistenceContext; import org.chorem.pollen.persistence.PollenTopiaApplicationContext; import org.chorem.pollen.persistence.PollenTopiaPersistenceContext; import org.chorem.pollen.persistence.entity.PollenPrincipal; +import org.chorem.pollen.persistence.entity.PollenUser; import org.chorem.pollen.persistence.entity.SessionToken; import org.chorem.pollen.services.DefaultPollenServiceContext; import org.chorem.pollen.services.PollenApplicationContext; @@ -256,6 +258,7 @@ public class PollenRestApiApplicationContext implements PollenApplicationContext try (PollenTopiaPersistenceContext persistenceContext = newPersistenceContext()) { PollenServiceContext serviceContext = newServiceContext(persistenceContext, Locale.FRANCE); + serviceContext.setSecurityContext(new InitSecurityContext()); serviceContext.newService(PollenUserService.class).createDefaultUsers(); } catch (InvalidFormException e) { //Can't happen @@ -270,4 +273,52 @@ public class PollenRestApiApplicationContext implements PollenApplicationContext started.set(true); } + + private class InitSecurityContext implements PollenSecurityContext { + + @Override + public PollenPrincipal getMainPrincipal() { + return null; + } + + @Override + public SessionToken getSessionToken() { + return null; + } + + @Override + public void setSessionToken(SessionToken sessionToken) { + + } + + @Override + public Subject getSubject() { + return null; + } + + @Override + public PollenUser getPollenUser() { + return null; + } + + @Override + public boolean isConnected() { + return true; + } + + @Override + public boolean isAdmin() { + return true; + } + + @Override + public void setSubject(Subject subject) { + + } + + @Override + public void setMainPrincipal(PollenPrincipal creator) { + + } + } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm