Through WEBUI, we can configure initializers that register the default users.
Simply add in the XML file /WEB-INF/conf/organization/organization-configuration.xml
, the users, roles, and membership types to pre-charge.
Use the following code to add, for example, the root user:
<object type=
"org.exoplatform.services.organization.OrganizationConfig$User">
<field name="userName">
<string>root</string></field>
<field name="password">
<string>gtn</string></field>
<field name="firstName">
<string>Root</string></field>
<field name="lastName">
<string>Root</string></field>
<field name="email">
<string>root@localhost</string></field>
<field name="groups">
<string>
manager:/platform/administrators,member:/platform/users,
member:/organization/management/executive-board
</string>
</field>
</object>
The membership type for the root user:
<object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
<field name="type">
<string>manager</string></field>
<field name="description">
<string>manager membership type</string></field>
</object>
And the group called administrators
for the root user:
<object type="org.exoplatform.services.organization.OrganizationConfig$Group">
<field name="name">
<string>administrators</string></field>
<field name="parentId">
<string>/platform</string></field>
<field name="description">
<string>the /platform/administrators group</string>
</field>
<field name="label">
<string>Administrators</string></field>
</object>
GateIn provides one class to import users, membership types, and groups in the database:
org.exoplatform.services.organization.OrganizationDatabaseInitializer
Through this service, we can add permissions available for the portal. The identity objects will be inserted in the database at the first start of the portal.
3.142.36.231