class DBService implements RolesProvider {

    void processGroupUserAuthorityRestrictions() {

        // if we don't have a user authority defined then there
        // is no work to be done

        if (zmsConfig.getUserAuthority() == null) {
            return;
        }

        // first we need to get all the groups that have the authority
        // filter or date expiry attributes set

        List<PrincipalGroup> groups;
        try (ObjectStoreConnection con = store.getConnection(true, false)) {
            groups = con.listGroupsWithUserAuthorityRestrictions();
        }

        if (groups == null) {
            return;
        }

        // for each group catch any exception and ignore since we
        // want to process all group and not allow a single one
        // prevent updating others

        for (PrincipalGroup group : groups) {
            try {
                enforceGroupUserAuthorityRestrictions(group.getDomainName(), group.getGroupName(),
                        group.getDomainUserAuthorityFilter());
            } catch (Exception ex) {
                LOG.error("Unable to process user authority restrictions for {}:group.{} - {}",
                        group.getDomainName(), group.getGroupName(), ex.getMessage());
            }
        }
    }

    public  DBService(ObjectStore store, AuditLogger auditLogger, ZMSConfig zmsConfig, AuditReferenceValidator auditReferenceValidator);

}