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

Migrate alpha to beta again #267

Merged
merged 30 commits into from
Jun 3, 2020
Merged

Migrate alpha to beta again #267

merged 30 commits into from
Jun 3, 2020

Conversation

HebaruSan
Copy link
Contributor

@HebaruSan HebaruSan commented May 27, 2020

Supposedly there's a production upgrade coming up in June to celebrate the release of Ubuntu 20.04. There are a couple of changes in alpha now that it would be nice to have ready for that (one of which is holding up KSP-CKAN/CKAN#3059), so this PR advances them to beta.

Included feature PRs:

Included fix PRs:

DasSkelett and others added 22 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
@HebaruSan
Copy link
Contributor Author

The "Merge branch 'beta' into alpha" commit was to resolve a phantom "conflict" that GitHub was showing in KerbalStuff/email.py. It has no changes because it wasn't a real conflict.

* 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
Copy link
Member

@DasSkelett DasSkelett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go!

@HebaruSan HebaruSan merged commit 0ba6412 into beta Jun 3, 2020
@HebaruSan HebaruSan mentioned this pull request Jun 20, 2020
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