Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

α → β Ⅲ #285

Merged
merged 39 commits into from
Jun 20, 2020
Merged

α → β Ⅲ #285

merged 39 commits into from
Jun 20, 2020

Conversation

HebaruSan
Copy link
Contributor

Successor to #242 and #267.
Minor changes that should go to prod when it upgrades.

Fixes:

Internal:

DasSkelett and others added 30 commits May 12, 2020 02:00
`spacedock.target` is not directly used on our servers, instead an edited copy exists in `/etc/systemd/system/`.
  See #258 for more information.
The `README.md` has been updated to reflect newer versions of Python and other dependencies in use.
The `api.md` has also been extended a little.
pystache is not Python3.8 compatible. Chevron is the continuation of it.
This commit adds the ability for admins to lock mods.
When locking mods, they will automatically be unpublished and as such are no longer visible to other users besides the author.
When locking mods, admins can leave a message up to 1024 chars. This message is shown to the author in place of the publish button.

Admins can (un)lock mods via a new button in the "Author Tools" section, only shown to them.
After unlocking the mod stays unpublished. The author or admin has to manually publish it again.

While the mod is locked, the author can still do everything he could do before with the mod, with the sole exception of publishing it.
This means updating, deleting versions, editing the description and so on is available, and might even be necessary to get the cause of the lock resolved.

Locking is done via the new route `/mod/mod_id/lock`(a), unlocking via `/mod/mod_id/unlock`.
They get the reason from the form, set `mod.published` to `False` respective `True`, and mod.locked to the contrary value.
A `notify_ckan()` is issued with the event type `locked` and `unlocked`.
Then they return a redirect to the mod page.

`mods.publish()` now checks `mod.locked` before publishing the mod. If it is locked, a 403 is returned.

The lock status is saved in `Mod.locked` (a bool, defaulting to `False` obviously), the lock reason message in `Mod.lock_reason`, a 1024-char unicode string.
The locking admin is saved in `Mod.locked_by`.
Renames the .follow-button class to .follow-mod-button (and .unfollow-button to .unfollow-mod-button to stay consistent).
Several times users reported missing download or follow buttons.
While I can't confirm it for the download button, I can reproduce it for the follow button thanks to a user reporting it together with the ad-blocker they are using.

It seems to be the "Block Tracking through Social-Media-Symbols" option in Adblock Plus.
It is based on the "Fanboy's Social Blocking List", which includes the filter ##.follow-button .

Renaming the class to .follow-mod-button resolves the problem.
Rename .follow-button class to workaround over-eager adblockers
* Don't restart containers in~ development setup

* Show short mod abstract below title; Add .vertical-centered css class

The new CSS class is used for the short mod abstract.
* Remove old links from navbar dropdown menu

* Remove spacedock-notify systemd remnants
* Fix default game fallback in _restore_game_info

* Don't default to KSP at mod creation
HebaruSan and others added 8 commits June 8, 2020 15:35
* Don't count unpublished mods on game page.
* Allow admins to publish mods
* Fix support channels missing from password-changed email.
* Mark mod as recently updated if only the KSP compatibility changed.
* Remove unnecessary if-else on game page.
* Replace forum thread link on admin page with the current one.
Fix support channels missing from password-changed email, and others:
* Don't count unpublished mods on game page.
* Allow admins to publish mods
* Fix support channels missing from password-changed email.
* Mark mod as recently updated if only the KSP compatibility changed.
* Remove unnecessary if-else on game page.
* Replace forum thread link on admin page with the current one.
@HebaruSan HebaruSan merged commit 4e67b2b into beta Jun 20, 2020
@HebaruSan
Copy link
Contributor Author

Another phantom merge required to resolve conflicts. I think it's the same reason that commits from #267 are still showing up.
Let's try a merge commit this time.

This was referenced Jun 28, 2020
This was referenced Oct 5, 2020
@HebaruSan HebaruSan mentioned this pull request Mar 14, 2021
@HebaruSan HebaruSan mentioned this pull request May 21, 2021
This was referenced Oct 2, 2021
@HebaruSan HebaruSan mentioned this pull request Apr 25, 2022
@HebaruSan HebaruSan mentioned this pull request Aug 31, 2022
@HebaruSan HebaruSan mentioned this pull request Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants