Revision 621a1869 src/pool/PoolSQL.cc

View differences:

src/pool/PoolSQL.cc
740 740
        acl_filter << " OR gid = " << *it;
741 741
    }
742 742

  
743
    for ( it = cids.begin(); it < cids.end(); it++ )
743
    string cl_table;
744

  
745
    if (auth_object == PoolObjectSQL::HOST)
746
    {
747
        cl_table = Cluster::host_table;
748
    }
749
    else if (auth_object == PoolObjectSQL::DATASTORE)
750
    {
751
        cl_table = Cluster::datastore_table;
752
    }
753
    else if (auth_object == PoolObjectSQL::NET)
744 754
    {
745
        acl_filter << " OR cid = " << *it;
755
        cl_table = Cluster::network_table;
756
    }
757

  
758
    if (!cl_table.empty())
759
    {
760
        for ( it = cids.begin(); it < cids.end(); it++ )
761
        {
762
            acl_filter << " OR oid IN ("
763
                << "SELECT oid from " << cl_table
764
                << " WHERE cid = " << *it << ")";
765
        }
746 766
    }
747 767

  
748 768
    filter = acl_filter.str();

Also available in: Unified diff