[jboss-user] [JBoss Portal] - Re: LDAP Authentication
roth
do-not-reply at jboss.com
Wed Aug 22 08:58:38 EDT 2007
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
More information about the jboss-user
mailing list