code: public @Nonnull
      List<String> getAuthorities() {
          if (!Jenkins.get().hasPermission(Jenkins.ADMINISTER)) {
              return Collections.emptyList();
          }
          List<String> r = new ArrayList<>();
          Authentication authentication;
          try {
              authentication = impersonate();
          } catch (UsernameNotFoundException x) {
              LOGGER.log(Level.FINE, "cannot look up authorities for " + id, x);
              return Collections.emptyList();
          }
          for (GrantedAuthority a : authentication.getAuthorities()) {
              if (a.equals(SecurityRealm.AUTHENTICATED_AUTHORITY)) {
                  continue;
              }
              String n = a.getAuthority();
              if (n != null && !idStrategy().equals(n, id)) {
                  r.add(n);
              }
          }
          r.sort(String.CASE_INSENSITIVE_ORDER);
          return r;
      }
docs: Checks for authorities (groups) associated with this user.
  If the caller lacks {@link Jenkins#ADMINISTER}, or any problems arise, returns an empty list.
  {@link SecurityRealm#AUTHENTICATED_AUTHORITY} and the username, if present, are omitted.
  
  @return a possibly empty list
  @since 1.498