FS#65554 - No way to disable AUR notifications when banned

Attached to Project: AUR web interface
Opened by Alberto Salvia Novella (es20490446e) - Wednesday, 19 February 2020, 06:49 GMT
Last edited by Jonas Witschel (diabonas) - Tuesday, 02 November 2021, 10:23 GMT
Task Type Bug Report
Category Backend
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version 4.7.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

My account is banned from the AUR, but I'm still receiving email notifications from it with no way to disable them.
This task depends upon

Closed by  Jonas Witschel (diabonas)
Tuesday, 02 November 2021, 10:23 GMT
Reason for closing:  Implemented
Comment by Lukas Fleischer (lfleischer) - Saturday, 22 February 2020, 10:58 GMT
I agree that this is an issue. Any suggestions? Should we automatically disable all notifications once an account is suspended?
Comment by Lukas Fleischer (lfleischer) - Saturday, 22 February 2020, 11:02 GMT
FWIW, I disabled all notifications on your account.
Comment by Alberto Salvia Novella (es20490446e) - Saturday, 22 February 2020, 13:31 GMT
Thank you. I think it should disable all notifications and let the user know it has been like that.
Comment by Kevin Morris (kevr) - Friday, 03 July 2020, 18:23 GMT
Agreed. Working on a patch.
Comment by Kevin Morris (kevr) - Friday, 03 July 2020, 18:48 GMT
Does a user currently get notified somehow when they're suspended? I'm having trouble finding a path to that.
Comment by Alberto Salvia Novella (es20490446e) - Friday, 03 July 2020, 19:29 GMT
You only get notified when you try to log in, and then the interface rejects you.

You meaning me. I will get my revenge.
Comment by Giancarlo Razzolini (grazzolini) - Friday, 03 July 2020, 21:01 GMT
Wait a sec, you're not actually getting notifications regarding packages, nor anything like that, but when trying to login to your suspended account on the AUR? That's a problem, indeed, and a funny one. Also, what is this nonsense of revenge?
Comment by Kevin Morris (kevr) - Friday, 03 July 2020, 22:18 GMT
I don't believe so, grazzolini. The PackageNotification records still exist for a suspended user, so whenever something updates on a package they were previously being notified on, it goes through it's normal process and sends the message. The notification I was asking about was in consideration of "let the user know it has been like that." I suppose we could add some more details to the account suspended message on login, but it seems a bit flimsy to only notify them in that case.

Edit: https://lists.archlinux.org/pipermail/aur-dev/2020-July/004915.html removes the user being suspended from the PackageNotification table completely. It doesn't go beyond and notify the user atm.

Patch is a bit heavy handed, though. Looking more into this.
Comment by Alberto Salvia Novella (es20490446e) - Friday, 03 July 2020, 22:25 GMT
I receive the notifications from the packages, but I didn't receive any notification when the account was suspended.
Comment by Eli Schwartz (eschwartz) - Friday, 03 July 2020, 22:56 GMT
I seem to recall you received extensive notifications before, during, and after your suspension.

As represented by the conversations with multiple TUs.

(I agree there was no aurweb notification that you were suspended, but that's generally handled by the responsible TU directly emailing you.)
Comment by Kevin Morris (kevr) - Friday, 03 July 2020, 23:10 GMT
I'm working on a patch now that doesn't disturb the PackageNotifications table; instead, it just checks to see if you're suspended or not before sending out the notification...
Comment by Doug Newgard (Scimmia) - Friday, 03 July 2020, 23:33 GMT
Fair warning, statements like "I will get my revenge." will get you banned here as well
Comment by Kevin Morris (kevr) - Friday, 03 July 2020, 23:53 GMT
```
action_map = {
'send-resetkey': ResetKeyNotification,
'welcome': WelcomeNotification,
'comment': CommentNotification,
'update': UpdateNotification,
'flag': FlagNotification,
'adopt': AdoptNotification,
'disown': DisownNotification,
'comaintainer-add': ComaintainerAddNotification,
'comaintainer-remove': ComaintainerRemoveNotification,
'delete': DeleteNotification,
'request-open': RequestOpenNotification,
'request-close': RequestCloseNotification,
'tu-vote-reminder': TUVoteReminderNotification,
}
```

Out of these, any notifications we want to preserve while suspended?

PS: As far as I can tell in the `aurweb-notify` code, any user that's associated ends up getting notified, regardless of being suspended. The fix here is to add an extra WHERE clause to each notification we want to silence: `Users.Suspended = 0`.
Comment by Kevin Morris (kevr) - Saturday, 04 July 2020, 00:08 GMT Comment by Giancarlo Razzolini (grazzolini) - Saturday, 04 July 2020, 01:17 GMT
I don't think there are any notifications worth sending while the account is suspended.
Comment by Kevin Morris (kevr) - Saturday, 04 July 2020, 01:31 GMT
Alright, follow-up patch sent that doesn't send anything to suspended users.

Sorry for that back and forth -- was focusing too high level at first.
Comment by Kevin Morris (kevr) - Saturday, 04 July 2020, 22:26 GMT
merged into aurweb branch `pu`.

Loading...