KSP-SpaceDock / SpaceDock

Current Codebase (Python /Flask)
https://spacedock.info
Other
72 stars 33 forks source link

Fix changelog editing for co-authors #483

Closed HebaruSan closed 1 year ago

HebaruSan commented 1 year ago

Problem

@BrettRyland reported on Discord that he couldn't edit the changelog entries for this mod:

This mod was editable for him though:

Cause

In one case, the user is the main author, in the other a co-author.

As of #414, the co-author check is missing from the new /mod_changelog route:

https://github.com/KSP-SpaceDock/SpaceDock/blob/af016ae8f28e8cf320363741b90cc40cd31e6f86/KerbalStuff/blueprints/mods.py#L209-L217

Previously editable would have been set to True during the /mod route's loop to add the co-authors to the display.

Changes

Now we use mod_check_editable to determine editability, which handles co-authors.