-
Type: Sub-task
-
Status: Closed (View Workflow)
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 0.17 Swallows
-
Fix Version/s: 0.18 Swallows, 1.5 Swallows, 1.4 Swallows
-
Labels:None
While Poulpe first starts, it starts with empty database and there is no possibility to log into it. We need to have a default user for this.
In order to have a user, we need a migration that inserts it and permissions (because user without permissions can't be logged into admin panel). So what migrations should do:
- Insert a component of type Poulpe into components table.
- Insert a group with name Administrators. Note that this is an en exceptional case when we should check whether this group exists already or not, because JCommune can create this group if it's deployed first. So CREATE IF NOT EXIST should be used or something like that.
- Insert user admin user with the same password (well, the password should be hashed first)
- Insert permissions in ACL tables for the group. The Administrators group should have ADMIN permissions on Poulpe component. Take a look at BasePermissions for details on what's the mask of ADMIN permission.
Be careful with this change, it should be done in branch, then we'll review it and only after that we'll merge it into master.