Uploaded image for project: 'Poulpe'
  1. Poulpe
  2. POULPE-228 Logging into Admininstration Panel
  3. POULPE-335

Create a migration with default admin user

VotersWatchers
    XMLWordPrintable

    Details

      Description

      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:

      1. Insert a component of type Poulpe into components table.
      2. 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.
      3. Insert user admin user with the same password (well, the password should be hashed first)
      4. 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.

        Attachments

          Structure

            Activity

              People

              • Assignee:
                julik Julia Atlygina
                Reporter:
                ctapobep Stanislav Bashkyrtsev
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4h Original Estimate - 4h
                  4h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 8.15h
                  8.15h

                    Structure Helper Panel