Table of Contents

Requirement

Super Admin

  1. Need to create a new role called 'Super Admin' for both at SuperSite level and SubSite level
  2. By default site admin will be Super admin for SubSite level
  3. By default super site admin will be Super Admin for SuperSite/SubSite level
  4. Only one Super Admin can exists at a time in a site
  5. Super Admin can view/delete any item in the site created by anyone

Rails Implementation

  1. Right now each company has five role types, add one more role named “Super Admin”
  2. Add a backfill task to update the “role_id” column of existing site admin/super admin user(default site creator) with the new role id created
  3. Once the user with “Super Admin” role logs in, list all the items(created by other users as well) in the “Created By Me” panel.
  4. Should also be able to delete any item (course/certification/live_event/in_person_event/blog/content/group) created in the site.
  5. Create migration to add a new record with privilege name as 'destroy_all' in privileges table

Sample Mock

DB changes

  1. Insert new record in Role table with name 'Super Admin' for each and every company
  2. Insert new record in Privilege table with name 'destroy_all' and description 'Destroy All'
  3. No new columns or tables are added