class DBService implements RolesProvider {

    void processRoleUserAuthorityRestrictions() {

        // 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 roles that have the authority
        // filter or date expiry attributes set

        List<PrincipalRole> roles;
        try (ObjectStoreConnection con = store.getConnection(true, false)) {
            roles = con.listRolesWithUserAuthorityRestrictions();
        }

        if (roles == null) {
            return;
        }

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

        for (PrincipalRole role : roles) {
            try {
                enforceRoleUserAuthorityRestrictions(role.getDomainName(), role.getRoleName(),
                        role.getDomainUserAuthorityFilter());
            } catch (Exception ex) {
                LOG.error("Unable to process user authority restrictions for {}:role.{} - {}",
                        role.getDomainName(), role.getRoleName(), ex.getMessage());
            }
        }
    }

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

}