Bug 41038

Summary: Add more test coverage for bug 30724
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: AuthenticationAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: Pushed to main --- QA Contact: Jonathan Druart <jonathan.druart>
Severity: normal    
Priority: P5 - low CC: dpavlin, jonathan.druart, kyle, lucas, paul.derscheid, tomascohen
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:
Bug Depends on: 30724    
Bug Blocks:    
Attachments: Bug 41038: Add tests for superlibrarian managing other users' 2FA
Bug 41038: Add tests for superlibrarian managing other users' 2FA
Bug 41038: Add tests for superlibrarian managing other users' 2FA

Description Nick Clemens (kidclamp) 2025-10-16 19:49:10 UTC
From bug 30724:
The (followup) patch fixes the selenium tests but they are not correct IMO.

We still need new tests to cover changes from this bug report.
Comment 1 Tomás Cohen Arazi (tcohen) 2025-11-03 19:29:32 UTC
Created attachment 188995 [details] [review]
Bug 41038: Add tests for superlibrarian managing other users' 2FA

Adds comprehensive selenium tests for the new functionality where
superlibrarians can manage 2FA settings for other patrons.

To test:
1. Run the existing authentication_2fa.t selenium tests
2. Notice missing coverage for cross-user 2FA management
3. Apply the patch
4. Run the tests again
5. Verify new subtests pass:
   - Superlibrarian can view/disable other users' 2FA
   - Enable button is hidden with explanatory message
   - Non-superlibrarian gets 403 error for other users
Comment 2 Kyle M Hall (khall) 2025-11-03 20:12:24 UTC
Created attachment 188999 [details] [review]
Bug 41038: Add tests for superlibrarian managing other users' 2FA

Adds comprehensive selenium tests for the new functionality where
superlibrarians can manage 2FA settings for other patrons.

To test:
1. Run the existing authentication_2fa.t selenium tests
2. Notice missing coverage for cross-user 2FA management
3. Apply the patch
4. Run the tests again
5. Verify new subtests pass:
   - Superlibrarian can view/disable other users' 2FA
   - Enable button is hidden with explanatory message
   - Non-superlibrarian gets 403 error for other users

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 3 Jonathan Druart 2025-11-14 13:26:43 UTC
Created attachment 189602 [details] [review]
Bug 41038: Add tests for superlibrarian managing other users' 2FA

Adds comprehensive selenium tests for the new functionality where
superlibrarians can manage 2FA settings for other patrons.

To test:
1. Run the existing authentication_2fa.t selenium tests
2. Notice missing coverage for cross-user 2FA management
3. Apply the patch
4. Run the tests again
5. Verify new subtests pass:
   - Superlibrarian can view/disable other users' 2FA
   - Enable button is hidden with explanatory message
   - Non-superlibrarian gets 403 error for other users

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Lucas Gass (lukeg) 2025-11-17 22:16:52 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 5 Paul Derscheid 2025-11-25 16:31:05 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 6 Paul Derscheid 2025-11-26 10:49:34 UTC
Reverted from 25.05.x as we don't have Bug 30724. Looked for deps in "Depends on". Please use the metadata fields :)