Skip to content

Commit aca3376

Browse files
authored
Merge pull request ceph#55661 from shreyanshjain7174/tracker_63791
RGW: a subuser with no permission can still list buckets and create buckets Reviewed-by: Jiffin Tony Thottan <[email protected]>
2 parents a3ce2f5 + 3cc27f0 commit aca3376

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/rgw/rgw_common.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,13 +1184,14 @@ bool verify_user_permission_no_policy(const DoutPrefixProvider* dpp,
11841184
if (s->identity->get_identity_type() == TYPE_ROLE)
11851185
return false;
11861186

1187-
/* S3 doesn't support account ACLs, so user_acl will be uninitialized. */
1188-
if (user_acl.get_owner().id.empty())
1189-
return true;
1190-
1187+
/* S3 doesn't have a subuser, it takes user permissions */
11911188
if ((perm & (int)s->perm_mask) != perm)
11921189
return false;
11931190

1191+
/* S3 doesn't support account ACLs, so user_acl will be uninitialized. */
1192+
if (user_acl.get_owner().id.empty())
1193+
return true;
1194+
11941195
return user_acl.verify_permission(dpp, *s->identity, perm, perm);
11951196
}
11961197

0 commit comments

Comments
 (0)