OSDCaps& caps = session->caps;
int pool = pgid.pool();
- int perm = caps.get_pool_cap(pool);
+ int perm = caps.get_pool_cap(pool, osdmap->get_pg_pool(pool)->v.auid);
dout(10) << "request for pool=" << pool << " perm=" << perm
<< " may_read=" << op->may_read() << " may_write=" << op->may_write()
//the owner has full access unless they've removed some by setting
//new caps
cap = OSD_POOL_CAP_ALL;
+ } else if ((iter = auid_map.find(uid)) != pools_map.end()) {
+ //if the owner is granted permissions on the pool owner's auid, grant them
+ OSDCap& auid_cap = iter->second;
+ cap |= auid_cap.allow;
+ cap &= ~auid_cap.deny;
}
return cap;