Skip to content

Commit

Permalink
Merge pull request ceph#14373 from rzarzynski/wip-rgw-19520
Browse files Browse the repository at this point in the history
rgw: fix broken /crossdomain.xml, /info and /healthcheck of Swift API.

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
  • Loading branch information
yehudasa committed May 4, 2017
2 parents ff724c9 + fe2afd4 commit 77a4357
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/rgw/rgw_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,13 @@ int rgw_build_bucket_policies(RGWRados* store, struct req_state* s)
if(s->dialect.compare("s3") == 0) {
s->bucket_acl = new RGWAccessControlPolicy_S3(s->cct);
} else if(s->dialect.compare("swift") == 0) {
s->user_acl = std::unique_ptr<RGWAccessControlPolicy>(
new RGWAccessControlPolicy_SWIFTAcct(s->cct));
/* We aren't allocating the account policy for those operations using
* the Swift's infrastructure that don't really need req_state::user.
* Typical example here is the implementation of /info. */
if (!s->user->user_id.empty()) {
s->user_acl = std::unique_ptr<RGWAccessControlPolicy>(
new RGWAccessControlPolicy_SWIFTAcct(s->cct));
}
s->bucket_acl = new RGWAccessControlPolicy_SWIFT(s->cct);
} else {
s->bucket_acl = new RGWAccessControlPolicy(s->cct);
Expand Down

0 comments on commit 77a4357

Please sign in to comment.