AnsweredAssumed Answered

Read Only Server Issue Adding Users

Question asked by pshark on Mar 30, 2012
Latest reply on Apr 3, 2012 by pshark
Hey guys,

I posted the same question in an an old topic, but was advised to make a new one. I'm using 4.0d Community edition of Alfresco.

I'm trying to create a user on the fly when a user logs in to the system. Here is a snippet of the code I added to the function authenticateImpl in the class

QName userVeto = QName.createQName(NamespaceService.APP_MODEL_1_0_URI, "UserVeto");
((TransactionServiceImpl)getTransactionService()).setAllowWrite(true, userVeto);
boolean testW = ((TransactionServiceImpl)getTransactionService()).isReadOnly();
boolean testW2 = ((TransactionServiceImpl)getTransactionService()).getAllowWrite();

The var testW is false, testW2 is true as expected. The createPerson function is throwing the error:
org.alfresco.service.transaction.ReadOnlyServerException: 02290094 Access Denied. The system is currently in read-only mode.

Is there something else I need to do to authenticate / enable write access? I added the code to modify the transaction service, but it doesn't appear to have done anything. The error is originating in the function newNode in the class org.alfresco.repo.domain.node.AbstractNodeDAOImpl at line 1066.
Note that I do not have the matching source code for this version of the class, so i can't say what is happening at this line. If someone could tell me what source code revision corresponds to the 4.0d community release, that might help as well.

Mainly, I'm hoping there is some way to perform an authentication / enable writing to the directory.