[Koha-bugs] [Bug 31503] Allow several consent types on the consents tab of OPAC account page

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Sep 3 08:38:45 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31503

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Signed Off

--- Comment #67 from David Nind <david at davidnind.com> ---
Testing notes (using KTD):

1. Apply patches - got a weird message (see [1]).
2. Update database (updatedatabase).
3. Restart everything (flush_memcached and restart_all).
4. Run the tests - these should pass:
   - prove t/db_dependent/Koha/Patron.t
   - prove t/db_dependent/AuthorisedValues.t
5. Install and enable the plugin included with the patches:
perl -MKoha::Plugin::Test_Newsletter
-e"Koha::Plugin::Test_Newsletter->new->install"
6. Restart everything (flush_memcached and restart_all) (I had to do this,
otherwise I got an error trace when accessing the OPAC account consents page). 
7. Enable the new system preference OPACCustomConsentTypes.
8. Go to the OPAC > [user account] > Consents tab.
9. If the PrivacyPolicyConsent system preference is disabled, then only the
Newsletter consent is displayed:
    9.1 If you select Yes + Save = "Your consent was registered on [date and
timestamp]."
    9.2 If you select No + Save = "We registered that you did not consent on
[date and timestamp]."
10. The standard PrivacyPolicyConsent system preference options should continue
to work as expected if OPACCustomConsentTypes is set to 'Don't allow' (enter a
URL in  PrivacyPolicyURL, for example http://example.com):
   10.1 disabled: No consent tab in OPAC account area)
   10.2 enforced: Verify that you can agree (Yes) or disagree (No) with the
consent and press Save:
         . If Yes, a comment is added: "Your consent was registered on [date
and timestamp]."
         . If No, you are logged out. (A comment is added under consents: "We
registered that you did not consent on [date and timestamp]." - you only see
this if you log in again)
   10.3 permissive: Verify that you can agree (Yes) or disagree (No) with the
consent and press Save:
         .  If Yes, a comment is added: "Your consent was registered on [date
and timestamp]."
         . If No, a comment is added and you are not logged out: "We registered
that you did not consent on [date and timestamp]."
11. If both OPACCustomConsentTypes and PrivacyPolicyConsent system prferences
are enabled, in addition to the default 'Privacy policy consent', there is now
the  Newsletter consent - the options for PrivacyPolicyConsent should continue
to work as expected:
   11.1 disabled: the default privacy policy consent doesn't appear, but the
Newsletter consent (from the plugin) appears as per step 9: 
   11.2 enforced: same as for step 10.2 for the privacy policy consent, and
step 9 for the newsletter consent
   11.3 permissive: same as for step 10.3 for the privacy policy consent, and
step 9 for the newsletter consent

I hope I tested this correctly!

I added a follow-up patch to amend the OPACCustomConsentTypes description -
note in CAPS and bold (the same as other Notes), and linked to
PrivacyPolicyConsent.

I had trouble attaching the patches because of the example plugin patch - I
hope I haven't screwed anything up!


[1] Output I get when applying the patches:

git bz apply 31503

Bug 31503 - Allow several consent types on the consents tab of OPAC account
page

155000 - Bug 31503: Change patron_consent.type
155001 - Bug 31503: Change usermenu condition, add preference
155002 - Bug 31503: Make opac-patron-consent more generic
155003 - DO NOT PUSH: Add example plugin

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 31503: Change patron_consent.type
Applying: Bug 31503: Change usermenu condition, add preference
Applying: Bug 31503: Make opac-patron-consent more generic
Applying: DO NOT PUSH: Add example plugin
Moving to starting point
Adding bug reference   6b2e2e2 DO NOT PUSH: Add example plugin
Cleaning up back to original state on error
Traceback (most recent call last):
  File "/usr/bin/git-bz", line 2834, in <module>
    applied = do_apply(bug_ref)
  File "/usr/bin/git-bz", line 1977, in do_apply
    add_url(bug, commits)
  File "/usr/bin/git-bz", line 1719, in add_url
    add_url_to_head_commit(commit, bug)
  File "/usr/bin/git-bz", line 1682, in add_url_to_head_commit
    git.commit(file="-", amend=True, _input=input)
  File "/usr/bin/git-bz", line 197, in f
    o = git_run(command, *args, **kwargs)
  File "/usr/bin/git-bz", line 167, in git_run
    output, error = process.communicate(input)
  File "/usr/lib/python3.9/subprocess.py", line 1134, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "/usr/lib/python3.9/subprocess.py", line 1961, in _communicate
    input_view = memoryview(self._input)
TypeError: memoryview: a bytes-like object is required, not 'str'

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list