Skip to content

Commit 5402b3a

Browse files
authored
Merge pull request ceph#62286 from aodinokov/swift-acl-tests-fix
rgw: fixing tempest ObjectTestACLs and ObjectACLsNegativeTest cases Reviewed-by: Casey Bodley <[email protected]>
2 parents f9a8403 + a413adc commit 5402b3a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/rgw/rgw_rest_swift.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2947,7 +2947,10 @@ int RGWHandler_REST_SWIFT::postauth_init(optional_yield y)
29472947
&& s->user->get_id().id == RGW_USER_ANON_ID) {
29482948
s->bucket_tenant = s->account_name;
29492949
} else {
2950-
s->bucket_tenant = s->auth.identity->get_tenant();
2950+
/* tenant must be taken from request. Can't use auth.identity->get_tenant(),
2951+
because there are cases when users from different tenant may be granted
2952+
access via ACL to this bucket */
2953+
s->bucket_tenant = s->user->get_tenant();
29512954
}
29522955
s->bucket_name = t->url_bucket;
29532956

0 commit comments

Comments
 (0)