08-28-2008 05:12 AM
08-28-2008 08:51 AM
HashMap<QName, Serializable> properties = new HashMap<QName, Serializable>();
properties.put(ContentModel.PROP_USERNAME, "testUser");
properties.put(ContentModel.PROP_HOMEFOLDER, userNodeRef);
properties.put(ContentModel.PROP_FIRSTNAME, "Test");
properties.put(ContentModel.PROP_LASTNAME, "User");
properties.put(ContentModel.PROP_EMAIL, "testUser@localhost.com");
personService.createPerson(properties);
authorityService.createAuthority(AuthorityType.GROUP, null, "myGroup");
authorityService.addAuthority(authorityService.getName(AuthorityType.GROUP,"myGroup"),"testUser");
08-29-2008 06:16 AM
09-01-2008 04:31 AM
09-01-2008 04:50 AM
javax.faces.FacesException: Error calling action method of component with id loginForm:submit
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
at javax.faces.component.UICommand.broadcast(UICommand.java:109)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{LoginBean.login}
at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
… 24 more
Caused by: org.alfresco.repo.security.permissions.AccessDeniedException: Access Denied. You do not have the appropriate permissions to perform this operation.
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:256)
at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:191)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
at $Proxy2.createNode(Unknown Source)
at org.alfresco.web.bean.repository.User.getUserPreferencesRef(User.java:216)
at org.alfresco.web.bean.repository.User.getPreferences(User.java:168)
at org.alfresco.web.bean.repository.PreferencesService.getPreferences(PreferencesService.java:69)
at org.alfresco.web.bean.repository.PreferencesService.getPreferences(PreferencesService.java:60)
at org.alfresco.web.bean.repository.PreferencesService.getPreferences(PreferencesService.java:50)
at org.alfresco.web.bean.UserPreferencesBean.getStartLocation(UserPreferencesBean.java:283)
at org.alfresco.web.bean.LoginBean.login(LoginBean.java:295)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
… 25 more
Caused by: net.sf.acegisecurity.AccessDeniedException: Access is denied.
at net.sf.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:86)
at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:394)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
… 46 more
09-01-2008 06:25 AM
//create the node to represent the Person
NodeRef newPerson = this.personService.createPerson(props);
// ensure the user can access their own Person object
permissionService.setPermission(newPerson,"testUser", permissionService.getAllPermission(), true);
// create the ACEGI Authentication instance for the new user
authenticationService.createAuthentication("testUser","testUser".toCharArray());
10-22-2008 04:59 PM
11-17-2008 10:45 AM
QName firstNameQName = QName.createQName("{http://www.alfresco.org/model/content/1.0}firstName");
QName lastNameQName = QName.createQName("{http://www.alfresco.org/model/content/1.0}lastName");
QName passwordQName = QName.createQName("{http://www.alfresco.org/model/content/1.0}password");
QName emailQName = QName.createQName("{http://www.alfresco.org/model/content/1.0}email");
QName homeFolderQName = QName.createQName("{http://www.alfresco.org/model/content/1.0}homeFolder");
Map<QName, Serializable> props = null;
props = new HashMap<QName, Serializable>(4);
props.put(firstNameQName, firstName);
props.put(lastNameQName, lastName);
props.put(passwordQName, passwd);
props.put(emailQName, email);
try{
configurationApplicationContext=WebApplicationContextUtils.getWebApplicationContext(this.getServlet().getServletContext());
authenticationService = (AuthenticationServiceImpl) configurationApplicationContext.getBean("authenticationService");
peopleService = (PeopleServiceImpl) configurationApplicationContext.getBean("peopleService");
nodeService = (NodeServiceImpl) configurationApplicationContext.getBean("nodeService");
ticket = authenticationService.authenticate(repositoryUri, userid, password.toCharArray());
[b]NodeRef homeFolder= nodeService.getRootNode(ticket, new StoreRef("workspace://SpacesStore"));[/b]
props.put(homeFolderQName, homeFolder);
NodeRef userRef = peopleService.createPerson(ticket, userName, passwd.toCharArray(), props);
11-17-2008 06:49 PM
12-03-2008 04:21 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.