Skip to content

Commit bc1cf5b

Browse files
committed
(main.py) Make KernelCI system users as superusers
Superusers can update others nodes, for example needed if kcidb bridge are processing other user nodes. This is temporary hack to make sure qualcomm setup works. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
1 parent 981ad84 commit bc1cf5b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

api/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,10 @@ async def authorize_user(node_id: str,
334334
status_code=status.HTTP_404_NOT_FOUND,
335335
detail=f"Node not found with id: {node_id}"
336336
)
337+
# users staging.kernelci.org and production are superusers
338+
# TBD: This is HACK until qualcomm can migrate to direct KCIDB
339+
if user.username in ['staging.kernelci.org', 'production']:
340+
return user
337341
if not user.username == node_from_id.owner:
338342
if not any(group.name in node_from_id.user_groups
339343
for group in user.groups):

0 commit comments

Comments
 (0)