I found the culprit. There is the string 'admin' hardcoded in 
cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java.

Once I change this to an existing user, all my errors go away. Can we 
unhardcode this please?


  |    /** Loads content from sar and adds it to the repo. */
  |    public void createContent() throws Exception
  |    {
  |       log.info("Creating default CMS content.");
  |       
  | 
  |       // Get the content
  |       URL root = 
Thread.currentThread().getContextClassLoader().getResource(defaultContentLocation);
  |       
  |       //make the user executing these to create the default content, an 
'Admin' user
  |       //without this, the fine grained security won't allow the creation
  |       UserModule userModule = getUserModule();
  |       if(userModule != null)
  |       {
  |           org.hibernate.Session session = 
org.jboss.portal.cms.hibernate.state.Tools.getOpenSession();
  |           org.hibernate.Transaction tx = session.beginTransaction();
  |           User user = userModule.findUserByUserName("admin"); // HERE
  |           if(user!=null)
  |           {
  |               JCRCMS.getUserInfo().set(user);
  |           }
  |           tx.rollback();
  |           org.jboss.portal.cms.hibernate.state.Tools.closeSession(session);
  |       }

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076833#4076833

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076833
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to