AnsweredAssumed Answered

DEFAULT_ADMIN='admin' causing problems

Question asked by kst on Sep 12, 2007
I have an alfresco instance that is hooked into our LDAP system for the PeopleService.  The problem is that an error being thrown during the bootstrap process.  After looking into the code, I found the following issues:

In org.alfresco.repo.admin.BaseInterpreter
DEFAULT_ADMIN is hardecoded to "admin".

In org.alfresco.repo.workflow.WorkflowInterpreter
There is an onBootstrap Method (shown below) that sets the current user to DEFAULT_ADMIN and also runs a command that assigns something to "admin". This seems to be the root cause of the problem.

We have no user named "admin".

I have three questions.

1. Is there already a method for controlling DEFAULT_ADMIN? Or should I do a code change.

2. Should I change the assignee from the hardcoded "admin" to DEFAULT_ADMIN, when I change DEFAULT_ADMIN.

3. Are there any hidden dependencies that I do not know about that my proposed changes would cause?

Thanks in advance,


——————————————————————————–

    protected void onBootstrap(ApplicationEvent event)
    {
        try
        {
            setCurrentUserName(BaseInterpreter.DEFAULT_ADMIN);
           
            if (!transactionService.isReadOnly())
            {
                interpretCommand("var bpm:package package 1");
                interpretCommand("var bpm:assignee person admin");
            }
           
            setCurrentUserName(null);
        }
        catch(IOException e)
        {
            throw new WorkflowException("Failed to initialise WorkflowInterpreter", e);
        }
    }

Outcomes