Skip to content

add the user as admin first than give it build permissions

Marta Vila Fernandes requested to merge admin into master

If a user is added in koji-users and koji-admins at same time, then we should try to add the user first as admin and then give her/him the build permissions.

Otherwise, we will get this error:

body = f"ERROR: An error happened while adding a custom build permission.\nError report:\n{custom_build_permissions_added[1]}"
KeyError: 1

The custom_build_add and eadmins_not_koji are the only not empty variables → since eadmins_not_koji is called in

manage_koji_actions(koji_users_to_admin, koji_users_revoke_admin, eadmins_not_koji, "admins", {}, {}, koji_client_session)

makes sense to run this function first than

manage_koji_actions(eusers_to_activate, koji_users_to_deactivate, eusers_koji_add, "users", custom_build_add, custom_build_remove, koji_client_session)

Merge request reports

Loading