Bug 35444 - Add easy way to retrieve a logged in user's categorycode
Summary: Add easy way to retrieve a logged in user's categorycode
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lucas Gass
QA Contact: Emily Lamancusa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-29 23:18 UTC by Lucas Gass
Modified: 2024-01-25 19:47 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 35444: Add hidden span with information about the loggedinuser categorycode (1.50 KB, patch)
2023-11-29 23:22 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 35444: Add hidden span with information about the loggedinuser categorycode (1.56 KB, patch)
2023-12-05 16:43 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 35444: Add hidden span with information about the loggedinuser categorycode (1.63 KB, patch)
2024-01-25 17:49 UTC, Emily Lamancusa
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2023-11-29 23:18:28 UTC
It would be useful when customizing Koha if we could easily know what the category code of the logged in user.
Comment 1 Lucas Gass 2023-11-29 23:22:26 UTC
Created attachment 159380 [details] [review]
Bug 35444: Add hidden span with information about the loggedinuser categorycode

To test:
1. APPLY PATCH
2. Log into the staff interface and use the browser's dev tools to look for the HTML class 'loggedincategorycode'. It should match the current logged in user's categorycode.
3. You could also use a console.log like so:

console.log( $('.loggedincategorycode').text() );
Comment 2 David Cook 2023-11-30 01:36:53 UTC
That could be interesting. Are you thinking mostly in terms of CSS or something else?
Comment 3 Owen Leonard 2023-12-05 16:43:14 UTC
Created attachment 159597 [details] [review]
Bug 35444: Add hidden span with information about the loggedinuser categorycode

To test:
1. APPLY PATCH
2. Log into the staff interface and use the browser's dev tools to look
   for the HTML class 'loggedincategorycode'. It should match the
   current logged in user's categorycode.
3. You could also use a console.log like so:

console.log( $('.loggedincategorycode').text() );

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Emily Lamancusa 2024-01-25 17:49:58 UTC
Created attachment 161454 [details] [review]
Bug 35444: Add hidden span with information about the loggedinuser categorycode

To test:
1. APPLY PATCH
2. Log into the staff interface and use the browser's dev tools to look
   for the HTML class 'loggedincategorycode'. It should match the
   current logged in user's categorycode.
3. You could also use a console.log like so:

console.log( $('.loggedincategorycode').text() );

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 5 Emily Lamancusa 2024-01-25 17:51:07 UTC
Trivial change, QA script happy. Passing QA.