docs: @Override
      public IPermission[] getAllPermissionsForPrincipal(
              IAuthorizationPrincipal principal, String owner, String activity, String target)
              throws AuthorizationException {
          IPermission[] perms = getPermissionsForPrincipal(principal, owner, activity, target);
          ArrayList<IPermission> al = new ArrayList<>(Arrays.asList(perms));
          Iterator i = getInheritedPrincipals(principal);
          while (i.hasNext()) {
              IAuthorizationPrincipal p = (IAuthorizationPrincipal) i.next();
              perms = getPermissionsForPrincipal(p, owner, activity, target);
              al.addAll(Arrays.asList(perms));
          }
  
          logger.trace(
                  "query for all permissions for principal=[{}], owner=[{}], activity=[{}], target=[{}] returned permissions [{}]",
                  principal,
                  owner,
                  activity,
                  target,
                  al);
  
          return ((IPermission[]) al.toArray(new IPermission[al.size()]));
      }