code: private void setAdminAttribute(Account account) {
          if (adminGroups != null) {
              for (String adminGroup : adminGroups) {
                  if (adminGroup.startsWith("@") && account.getUsername().equalsIgnoreCase(adminGroup.substring(1))) {
                      // admin user
                      account.getAuthorizations().addPermission("*");
                  } else if (account.hasRole(adminGroup)) {
                      // admin role
                      account.getAuthorizations().addPermission("*");
                  }
              }
          }
      }
docs: Set the admin attribute from group memberships retrieved from LDAP.
  
  @param account