-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Several CKAN integration fixes #337
Conversation
OK, commenting out the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual code changes here seem to work and they make sense to me. 👍
You can accept or reject the UI suggestions as you like.
Ugh, you're using Chrome, right? So Chrome, contrary to Firefox, does not ignore the |
32d99b4
to
c5d8c44
Compare
Problems
The following steps lead to no notification sent:
Causes
request.form.get("ckan")
isNone
in the POST. Sockan
isFalse
, and we never get to thesend_to_ckan()
part. Even if it weren't,mod.ckan
would be already true the second time and prevent it as well.notify_ckan()
for "locked" and "unlocked",mod.published
isFalse
. Thus the notification isn't sent.Changes
The CKAN logic in
/mod/<int:mod_id>/<path:mod_name>/edit
is reworked.send_to_ckan()
will take care of cancelling if the mod isn't published yet)The checkbox can be disabled again, as long as the mod isn't published yet or you're an admin. Yes, authors can also disable the checkbox if the mod is unpublished due to it being locked, but I think this is fine, there's a decent change CKAN froze the mod already anyways (if they got the notification).
The HTML around the CKAN checkbox has been polished. The checkbox is shown all the time on the edit page, pre-checked if it has already been activated. However it's locked for users if the mod is published. The toolltip is replaced by a hidden, more detailed help text shown on button press.
There's a new
force
parameter innotify_ckan()
, defaulting toFalse
. It overrides(mod.published)
. We set it toTrue
when calling inlock()
andunlock()
, and alsodelete()
even though it isn't necessary there but let's guard against future changes.The command for celery in the docker-compose files is fixed. Since version 5.0 the
--app
/-A
option needs to be before theworker
argument. I've had this in my working directory for some time apparently and forgot about it. The systemd files are fine, they already have it in that order.Postgres is no longer locked to the minor version, only to the major. It doesn't match current production anyway (11.3, bad, I know), and it makes sense to stay up to date locally so we can detect problems early.
The
Secure
cookie settings for Flask are only enabled ifapp.debug
isFalse
, to allow local testing with Chrome. Need to think of a solution for the cookies set dynamically via JS.