Commit graph

52482 commits

Author SHA1 Message Date
919d0d4c02
Bug 36102: Generate a new sessionID if the existing one is invalid
If the cookie contain an expired sessionID we need to create another
one to correctly generate the CSRF token.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:33 +01:00
e533d5745c
Bug 36102: Do not repeat op or csrf_token on the login form - staff
Needed for OPAC?

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:32 +01:00
5b82d61477
Bug 36102: (follow-up) Add cud-login to the login form
Hum this didn't make sense. We are not checking credentials after
checkauth.

This patch is suggesting to rename "userid" and "password" parameters
from login forms to "login_userid" and "login_password" to not interfere
with other parameters with the same name.

This looks quite correct, however I am seeing
  "The form submission failed (Wrong CSRF token)."
in the log after a successful login. Which feels wrong, what's
happening?

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:31 +01:00
8f5782cf70
Bug 36102: Do not keep op and csrf_token in param list after login - OPAC
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:30 +01:00
74511d87b5
Bug 36102: Fix 01-installation.t
Something very weird is happening here.

There is a FIXME already, but the trick does not seem to work anymore
(?)

This patch contains some debug statements and take some screenshots.
We are reaching the cud-selectframeworks step then we are expecting the
form to submit the form with op=cud-addframeworks

BUT it seems that "op" is empty, and there is an unexpected warning from
Starman:

==> /var/log/koha/kohadev/plack-error.log <==
""
Use of uninitialized value in string ne at /usr/share/perl5/Starman/Server.pm line 304.

==> /var/log/koha/kohadev/plack-intranet-error.log <==
[2024/02/15 13:09:34] [WARN] Warning: something's wrong at /kohadevbox/koha/installer/install.pl line 89.

What's going on here??

UPDATE: This is fixed by "Bug 34478: Manual fix - Make Koha::Token use
session id not userenv id"

Bug 36102: [TO SQUASH] Fix 01-installation.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:29 +01:00
fabbd8f940
Bug 36102: Use Koha::Session from C4::InstallAuth
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:28 +01:00
88797c54b0
Bug 36102: Add cud-login to the login form
TODO This needs to be covered by tests.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:27 +01:00
8a20c96b6f
Bug 34478: serials/routing-preview.pl
Not totally done, still need the "save and preview"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:27 +01:00
18b046598c
Bug 34478: (follow-up) Move resend link out of form for display reasons
This improves display. This only comes up when you try to reset your
password after you did already.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:26 +01:00
c9375e746b
Bug 34478: (follow-up) Manual fix - Make Koha::Token use session id not userenv id
See comment 174.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:25 +01:00
f859c30704
Bug 34478: Fix www/auth_values_input_www.t
See bug 36189, we need to rewrite this using Selenium.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:24 +01:00
bb54d3f1ce
Bug 34478: Manual fix - reopen basket - add cud- - basket.tt
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:23 +01:00
ff4b63d5c5
Bug 34478: Add cud to updatestructure
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:22 +01:00
74d7ae7672
Bug 34478: (follow-up) batchMod
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:22 +01:00
925eb73a27
Bug 34478: (follow-up) batch_record_modification
Fix Edit > Modify record using template

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:21 +01:00
bb7a181b61
Bug 34478: Fix delete from addbiblio
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:20 +01:00
f5681518f0
Bug 34478: Fix delallitems for additem
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:19 +01:00
cee85d7a5a
Bug 34478: Fix saveitem and delete for additem
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:18 +01:00
fe6c8e7aa0
Bug 34478: Manual fix - adjust op for acqui/cancelorder
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:17 +01:00
84da78796e
Bug 34478: Adjust 'op' on serials/subscription-renew
multi_renew now has a validation step
This patch also removes 2 variables that were not used ($mode and $done)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:16 +01:00
8c3a25bf1f
Bug 34478: Prevent renew if logged in user is not allowed to
This should be on its own bug. Feel free to do it if you have the
energy, I do not.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:16 +01:00
c706fc9e41
Bug 34478: Replace delete links with form - smart-rules
We can certainly do better here (too many duplicated code in on click
functions), but it's good enouh for now...

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:15 +01:00
f03b7ce0d0
Bug 34478: Manual fix - remove cud from members/search
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:14 +01:00
e1c6f70c77
Bug 34478: Move to get - reserve/request.tt:248
This form is never sent

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:13 +01:00
5c999b1241
Bug 34478: Move to get - acqui/uncertainprice
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:12 +01:00
099df862d3
Bug 34478: Convert form to link - sci-main
Nothing to POST, we could move to GET, but we do not have parameters. A
link is good here.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:11 +01:00
cb922721fd
Bug 34478: (follow-up) Fix circ/set-library
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:11 +01:00
f2394c8c09
Bug 34478: Corrections to some serials scripts
This patch updates the serials toolbar and related JS so that delete,
close, and reopen are all POST operations.

The patch also fixes an incorrect op check in the subscription search
popup.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:10 +01:00
63a51acc83
Bug 34478: Correct op name for list edit confirmation
The 'delete_confirm' op leads to a confirmation page, so it's GET.

The patch also consolidates JS for handling deletions, using the same
class for both the delete button in the toolbar and in the table of
lists.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:09 +01:00
882305704e
Bug 34478: OPAC problem reports template update for messages
The template uses checks on the op value to show messages, so those
checks have to be updated with the new values.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:08 +01:00
32b1d59568
Bug 34478: Correct op name in CSV profile deletion confirmation step
The 'delete_confirm' op leads to a confirmation page, so it's GET.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:07 +01:00
5b8cfd5f30
Bug 34478: Correct op name in notice deletion confirmation step
The 'delete_confirm' op leads to a confirmation page, so it's GET.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:06 +01:00
4e5944f7f9
Bug 34478: Fixes for MARC modification template management
This patch converts several delete links to POSTed forms and corrects
the op variable names in the script. The patch also simplifies the
deletion click handlers.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:05 +01:00
7798f0346c
Bug 34478: SQUASH Follow-up to previous batch operations patches
- Get the CSRF token from the pop-up instead of from the parent window,
  since that seems to work
- Remove some click handlers which were made obsolete

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:05 +01:00
a482208f09
Bug 34478: (follow-up) Changes for opac-password-recovery
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:04 +01:00
31ed10b82d
Bug 34478: SQUASH further changes to batch biblio operations
This patch makes a number of changes to finish incomplete work in
668cd06e1960a3878ec1c976ce7f2e1f93688468

Initial submissions to batch biblio operations have to accommodate
POSTed file data, so this patch makes changes to instances where we were
submitting biblionumbers in a URL.

We could also choose to make a change in tools/batch_delete_records.pl
and tools/batch_record_modification.pl to handle different "list"
operations differently based on the method of submission. This patch
presents only the client-side option.

The cart presented a unique problem in that it requires that data be
passed from the pop-up window to the parent window, something which
can't as easily be done with a form as with a URL. The workaround I came
up with is to dynamically generate the form in the parent page and
trigger the submission from there.

Also changed:

- More updated CSS to handle buttons inside dropdowns inside toolbars.
- Correct op names for the "list" operation in batch modify and delete

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:03 +01:00
41704bdb16
Bug 34478: Manual fix - serials/subscription-add.pl
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:02 +01:00
647d59b449
Bug 34478: import_export_authtype - cud-import, export
Changing action to op.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:01 +01:00
8eed84fe0b
Bug 34478: (follow-up) patroncards: FIXMEs for op and missing script
Looks like create-csv never made it.
Some op's look like GET to me. Creating a pdf is just downloading.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:00 +01:00
195cccd4ef
Bug 34478: (follow-up) patroncards: cud-delete from edit-batch and manage
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:59 +01:00
e2125d00e1
Bug 34478: (follow-up) patron-cards/edit-batch: op cud-remove, cud-dedup
This is about the links for Remove selected patrons, and Remove duplicates.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:59 +01:00
18ff295923
Bug 34478: patroncards/edit-batch: Fix for removing patrons
Added a form for delete link from patron table.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:58 +01:00
d8909a5eb9
Bug 34478: (follow-up) audio_alerts: Correct duplicate form id's
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:57 +01:00
688759b0d5
Bug 34478: (follow-up) upload-cover-image.pl: Remove bitwise-and from condition
Add one character and we should be fine :)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:56 +01:00
9736227d68
Bug 34478: Manual fix - tools/batchMod-del
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:55 +01:00
268e898910
Bug 34478: Manual fix - admin/systempreferences
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:54 +01:00
aa5ec5029d
Bug 34478: Manual fix - admin/patron-attr-types
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:54 +01:00
1d23984ce3
Bug 34478: Manual fix - admin/matching-rules
Bug 34478: [TO SQUASH] Manual fix - admin/matching-rules

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:53 +01:00
d57384dbd5
Bug 34478: Manual fix - acqui/basket.pl - export
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:52 +01:00
41e8e79b88
Bug 34478: Manual fix - acqui/duplicate_orders.tt
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:51 +01:00