code: private void populateInitialAuthorizationTable() {
          clearAuthorizationTable();
  
          Map<String, Set<String>> userToRoleName = new HashMap<String, Set<String>>();
          Map<String, Set<String>> groupToRoleName = new HashMap<String, Set<String>>();
          Iterator<ManagementRole> itr = managementRoles.getServices();
          while (itr.hasNext()) {
              ManagementRole role = itr.next();
              String roleName = role.getRoleName();
              for (String user : role.getUsers()) {
                  Set<String> assignedRoles = userToRoleName.get(user);
                  if (assignedRoles == null) {
                      assignedRoles = new HashSet<String>();
                      userToRoleName.put(user, assignedRoles);
                  }
                  assignedRoles.add(roleName);
              }
  
              for (String group : role.getGroups()) {
                  Set<String> assignedRoles = groupToRoleName.get(group);
                  if (assignedRoles == null) {
                      assignedRoles = new HashSet<String>();
                      groupToRoleName.put(group, assignedRoles);
                  }
                  assignedRoles.add(roleName);
              }
  
          }
  
          for (Map.Entry<String, Set<String>> entry : userToRoleName.entrySet()) {
              userToRoles.put(entry.getKey(), new RoleSet(entry.getValue()));
          }
  
          for (Map.Entry<String, Set<String>> entry : groupToRoleName.entrySet()) {
              groupToRoles.put(entry.getKey(), new RoleSet(entry.getValue()));
          }
  
      }
docs: Construct the authorization table for the given management roles.
  <p>
  Right now, this is implemented to do a full rebuild every time we
  get new information. This logic probably could be improved for
  performance, some day.
  <p>
  This will take all of the known roles and their associated users
  and groups and convert that mapping to all known users and groups
  with their associated roles.
  <p>
  Access IDs are not computed at this time and are deferred until
  the first request.