Here is alfresco-demo-data, they create user, group and some pieces of repository. But if you look a little deeper into code and examine PeopleUsersGroupAcpExporter, you see that to create some users you need:
- acp archive with xml file with about 10-15 properties for one user
- every user must have password hash, passwprd2 hash and salt, e.g. it is unclear how to create user with test
123
password. - create several classes:
PeopleUsersGroupAcpExporter
,DynamicBootstrapPatchPostProcessor
,ResourcesResolver
,UsersImporterPatch
,GroupsImporterPatch
with a lot of code.
And finally this classes wrap (put) some data into spring bean definition.
Definitely there are must much simpler way to create/import user and group at alfresco start up.
Note 1
Here is very similar question, but they used authenticationService
, whithout telling what type it is. There is org.jbpm.security.AuthenticationService
and org.alfresco.service.cmr.security.AuthenticationService
but both do not have any *create*
methods
Note 2
Alfresco already has a feature csv import/expport user, but it is about users only. It do not provides attaching imported users to group automatically.