Skip to content

Bugfix/project owner lost admin perm#661

Merged
vincent-olivert-riera merged 2 commits intoline:masterfrom
hoangpn:bugfix/project_owner_lost_admin_perm
Oct 29, 2025
Merged

Bugfix/project owner lost admin perm#661
vincent-olivert-riera merged 2 commits intoline:masterfrom
hoangpn:bugfix/project_owner_lost_admin_perm

Conversation

@hoangpn
Copy link
Contributor

@hoangpn hoangpn commented Oct 27, 2025

No description provided.

Copy link
Contributor

@vincent-olivert-riera vincent-olivert-riera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, but please take a look at the comments. 🙇

@vincent-olivert-riera
Copy link
Contributor

@hoangpn , looks good. Please squash the fixups.

@hoangpn hoangpn force-pushed the bugfix/project_owner_lost_admin_perm branch from cf80363 to d8d9ec1 Compare October 29, 2025 02:42
In Promgen, there's currently an issue where a project's owner might not have admin
permission on that project. This happens when a user, A, is both the owner of a project
and has permission on its parent service. If another user, B, tries to remove user A's
permission from the service and checks the "Remove permissions on child projects" option,
user A will lose admin permission on the project, even though they remain the owner.

This situation goes against our Promgen rule, which ensures that an object's owner always
has admin permission on it. However, actions on a service should have a greater impact
than on its child projects. So, we've decided to respect user B's action in this case.
Therefore, to resolve this issue, the removal of permissions will proceed successfully,
and the project's ownership will be transferred to the owner of the parent service.
A warning also was added to notice user about the change of the owner.
At commit 7222e82, we fixed the bug where the project's owner lost admin permission.
We added a migration file to re-assign the owner to projects which have this data
inconsistency. The ownership of the project is transferred from the current owner to the
service's owner, and also the admin permission is granted to these new owners.
@hoangpn hoangpn force-pushed the bugfix/project_owner_lost_admin_perm branch from d8d9ec1 to a9bd809 Compare October 29, 2025 03:16
@vincent-olivert-riera vincent-olivert-riera merged commit dfd32cd into line:master Oct 29, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants