Skip to content

Commit 774f343

Browse files
committed
IAM | User ID for principal is not supported
Signed-off-by: Naveen Paul <napaul@redhat.com>
1 parent 89f64d8 commit 774f343

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/server/system_services/bucket_server.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,10 @@ async function get_account_by_principal(principal) {
559559
if (principal_by_arn) return true;
560560
} else {
561561
const account = system_store.data.accounts.find(acc => acc._id.toString() === principal_as_string);
562+
if (account.owner) {
563+
dbg.log3('get_account_by_principal: principal_by_id not supported for IAM users');
564+
return false;
565+
}
562566
const principal_by_id = account !== undefined;
563567
dbg.log3('get_account_by_principal: principal_by_id', principal_by_id);
564568
if (principal_by_id) return true;

0 commit comments

Comments
 (0)