[PATCH] Add capability for co-maintainers to disown packages
Implements FS#53832
Signed-off-by: Mark Weiman
On Tue, 06 Feb 2018 at 03:54:56, Mark Weiman wrote:
Implements FS#53832
Signed-off-by: Mark Weiman
--- web/html/pkgbase.php | 3 +++ web/html/pkgdisown.php | 13 ++++++++++--- web/lib/pkgbasefuncs.inc.php | 12 ++++++++++-- web/template/pkgbase_actions.php | 2 +- 4 files changed, 24 insertions(+), 6 deletions(-) [...] @@ -23,7 +26,11 @@ if (has_credential(CRED_PKGBASE_DISOWN, $maintainer_uids)): ?> <?php endforeach; ?> </ul> <p> - <?php if (count($comaintainers) > 0 && !has_credential(CRED_PKGBASE_DISOWN)): ?> + + <?php if (in_array(uid_from_sid($_COOKIE["AURSID"]), $comaintainer_uids) && !has_credential(CRED_PKGBASE_DISOWN)): + $action = "do_DisownComaintainer"; ?> + <?= __("By selecting the checkbox, you confirm that you want to no longer be a package co-maintainer.") ?> + <?php elseif (count($comaintainers) > 0 && !has_credential(CRED_PKGBASE_DISOWN)): ?>
I am not sure whether it is a good idea to use the same button for disowning a package as a maintainer or as a co-maintainer? What happens if a user is both a maintainer and a co-maintainer (and what is the expected behavior)? Anyway, merged this into pu as-is for now; we can still replace it later. Regards, Lukas
On 02/23/2018 12:46 AM, Lukas Fleischer wrote:
I am not sure whether it is a good idea to use the same button for disowning a package as a maintainer or as a co-maintainer? What happens if a user is both a maintainer and a co-maintainer (and what is the expected behavior)?
If it *is* possible to be both, maybe we should fix that instead? :p Anyway, if you click the disown button we assume you want to ditch the package altogether... if you are the maintainer and want to edit the comaintainer list we have a UI for that already. -- Eli Schwartz Bug Wrangler and Trusted User
On Fri, 2018-02-23 at 08:21 -0500, Eli Schwartz wrote:
On 02/23/2018 12:46 AM, Lukas Fleischer wrote:
I am not sure whether it is a good idea to use the same button for disowning a package as a maintainer or as a co-maintainer? What happens if a user is both a maintainer and a co-maintainer (and what is the expected behavior)?
If it *is* possible to be both, maybe we should fix that instead? :p
It is possible and I will submit a patch to fix that this week.
Anyway, if you click the disown button we assume you want to ditch the package altogether... if you are the maintainer and want to edit the comaintainer list we have a UI for that already.
On Mon, 05 Mar 2018 at 07:03:01, Mark Weiman wrote:
On Fri, 2018-02-23 at 08:21 -0500, Eli Schwartz wrote:
On 02/23/2018 12:46 AM, Lukas Fleischer wrote:
I am not sure whether it is a good idea to use the same button for disowning a package as a maintainer or as a co-maintainer? What happens if a user is both a maintainer and a co-maintainer (and what is the expected behavior)?
If it *is* possible to be both, maybe we should fix that instead? :p
It is possible and I will submit a patch to fix that this week.
Anyway, if you click the disown button we assume you want to ditch the package altogether... if you are the maintainer and want to edit the comaintainer list we have a UI for that already.
I am not too sure. The current implementation allows the maintainer to nominate a new maintainer and make himself a co-maintainer (by putting himself at the end of the list of co-maintainers and disowning the package). I guess this functionality will be lost after the "fix"? Regards, Lukas
On Mon, Mar 05, 2018 at 07:39:04AM +0100, Lukas Fleischer wrote:
On Mon, 05 Mar 2018 at 07:03:01, Mark Weiman wrote:
On Fri, 2018-02-23 at 08:21 -0500, Eli Schwartz wrote:
On 02/23/2018 12:46 AM, Lukas Fleischer wrote:
I am not sure whether it is a good idea to use the same button for disowning a package as a maintainer or as a co-maintainer? What happens if a user is both a maintainer and a co-maintainer (and what is the expected behavior)?
If it *is* possible to be both, maybe we should fix that instead? :p
It is possible and I will submit a patch to fix that this week.
Anyway, if you click the disown button we assume you want to ditch the package altogether... if you are the maintainer and want to edit the comaintainer list we have a UI for that already.
I am not too sure. The current implementation allows the maintainer to nominate a new maintainer and make himself a co-maintainer (by putting himself at the end of the list of co-maintainers and disowning the package).
My thought is that the disown button should not change the co-maintainers if the disowning user is the maintainer. A user that is the maintainer and co-maintainer of a package should have to disown twice to be removed as a maintainer and co-maintainer. I don't think this edge-case merits a second button. Regards, Mikael
On Mon, 05 Mar 2018 at 16:50:01, Mikael Blomstrand wrote:
[...] My thought is that the disown button should not change the co-maintainers if the disowning user is the maintainer. A user that is the maintainer and co-maintainer of a package should have to disown twice to be removed as a maintainer and co-maintainer.
That sounds like a great idea. Do we need any adjustments to your patch to get this feature, Mark?
participants (4)
-
Eli Schwartz
-
Lukas Fleischer
-
Mark Weiman
-
Mikael Blomstrand