Skip to content

Commit 2ffe3ae

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

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/server/system_services/bucket_server.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,11 @@ 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-
const principal_by_id = account !== undefined;
562+
if (account && account.owner) {
563+
dbg.log3('get_account_by_principal: principal_by_id not supported for IAM users');
564+
return false;
565+
}
566+
const principal_by_id = Boolean(account);
563567
dbg.log3('get_account_by_principal: principal_by_id', principal_by_id);
564568
if (principal_by_id) return true;
565569
}

0 commit comments

Comments
 (0)