mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix: don't check suspension for ownership changes
People can change comaintainer ownership to suspended users if they want to. Suspended users cannot login, so there is no breach of security here. It does make sense to allow ownership to be changed, imo. Closes #339 Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
e2a17fef95
commit
13217be939
3 changed files with 25 additions and 4 deletions
|
@ -299,6 +299,21 @@ You were removed from the co-maintainer list of {pkgbase.Name} [1].
|
|||
assert email.body == expected
|
||||
|
||||
|
||||
def test_suspended_ownership_change(user: User, pkgbases: List[PackageBase]):
|
||||
with db.begin():
|
||||
user.Suspended = 1
|
||||
|
||||
pkgbase = pkgbases[0]
|
||||
notif = notify.ComaintainerAddNotification(user.ID, pkgbase.ID)
|
||||
notif.send()
|
||||
assert Email.count() == 1
|
||||
|
||||
Email.reset() # Clear the Email pool
|
||||
notif = notify.ComaintainerRemoveNotification(user.ID, pkgbase.ID)
|
||||
notif.send()
|
||||
assert Email.count() == 1
|
||||
|
||||
|
||||
def test_delete(user: User, user2: User, pkgbases: List[PackageBase]):
|
||||
pkgbase = pkgbases[0]
|
||||
notif = notify.DeleteNotification(user2.ID, pkgbase.ID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue