class ZMSImpl implements Authorizer, KeyStore, ZMSHandler {

    boolean isAllowedDeletePendingGroupMembership(Principal principal, final String domainName,
                                                  final String groupName, final String memberName) {

        // first lets check if the principal has update access on the group

        AthenzDomain domain = getAthenzDomain(domainName, false);
        if (domain == null) {
            throw ZMSUtils.notFoundError("Domain not found: " + domainName, "deletePendingGroupMembership");
        }
        if (isAllowedPutMembershipAccess(principal, domain, ZMSUtils.groupResourceName(domainName, groupName))) {
            return true;
        }

        // check of the requestor of the pending request is the principal

        GroupMembership pendingGroupMember = dbService.getGroupMembership(domainName, groupName, memberName, 0, true);
        return pendingGroupMember != null && principal.getFullName().equals(pendingGroupMember.getRequestPrincipal());
    }

    public  ZMSImpl();

}