nafiesl / silsilah

A genealogy/family tree application, built with Laravel.
MIT License
588 stars 284 forks source link

Admin for Managing All Users and DB Backup Manager #50

Closed nafiesl closed 4 years ago

nafiesl commented 4 years ago

In this PR, we are adding possibility for users become System admin, where they can manage all user data on the silsilah system and database backup files.

How to test

  1. Checkout the branch

    git checkout master
    git pull origin
    git checkout 49_system_admins
  2. On .env file

    SYSTEM_ADMIN_EMAILS=admin@email.com;other_admin@email.com
  3. Use the those email on the existing user, or Insert ones sample admin user (optional):

    INSERT INTO `users` (`id`, `nickname`, `name`, `gender_id`, `email`, `password`, `created_at`, `updated_at`) VALUES
    ('e8ea4793-2d56-4fc7-a3eb-9d57013fccc', 'Sysadmin', 'System Admin', '1', 'admin@email.com', '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', '2020-04-11 19:21:01', '2020-04-11 19:21:01');
  4. Login as the admin user:

    email: admin@email.com
    password: secret
  5. Visit any user's profile, the edit button should be available. Also visit any couple profile, we should see the edit button as well.

This PR should resolves #49.