Bug 37052 - Restrict reports so they can only be run by permitted users
Summary: Restrict reports so they can only be run by permitted users
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-07 09:06 UTC by gclg
Modified: 2024-10-10 16:20 UTC (History)
7 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gclg 2024-06-07 09:06:27 UTC
At the moment the only way to limit access to reports is to limit permissions to run them. This means Staff either have the ability to run or not run any report. Would it be possible to limit access by User ID meaning that a more granular access level is possible.
Comment 1 Magnus Enger 2024-06-07 10:42:06 UTC
Same as bug 25659?
Comment 2 gclg 2024-06-10 07:24:30 UTC
If access to the permission Execute SQL reports (execute_reports) is unticked then all the options mentioned would be made unavailable. 

What I am proposing is the ability to limit the ability to run certain reports by used ID.
Comment 3 Katrin Fischer 2024-06-17 10:54:28 UTC
Bug 30198 might also be interesting in this context.
Comment 4 David Cook 2024-06-17 23:14:29 UTC
(In reply to gclg from comment #2)
> What I am proposing is the ability to limit the ability to run certain
> reports by used ID.

I think that I like this idea. 

For backwards compatibility, I think all existing reports would have to be allowed for any User ID. However, for new Koha installs, it would be interesting to default to only allow the creator of the report to run it (or a superlibrarian). And then the creator/owner or the superlibrarian could add more users to run it. 

So if the only Reports permission the user has is "Execute SQL reports (execute_reports)" and they are only allowed to run certain reports... that would dramatically improve the current situation.

--

One thing to keep in mind... this could get unwieldy/difficult to manage. Some libraries have hundreds of reports, and you might have 10 staff who should have the same/similar access to many of those. (This is where RBAC would come in handy. You could assign a bunch of reports to a particular group. We could potentially do this with patron category, but I don't think most libraries have granular library staff categories.)
Comment 5 gclg 2024-10-10 15:50:40 UTC
We are one of the Libraries with 100s of reports so would share the pain. I reckon the limitation would need to be made on ID as the default minimal access option [bar none] is to apply the option to run a report when assigning permissions at the point of account creation. 

Account created [account ID] - permission to run reports [granted] - account ID required to run/execute the report. I imagine this will tick a few boxes in terms of system access and data security too.

It may well be another option in the tools permissions would be needed for accounts below Super Librarian.... "Assign report permissions (execute_reports)"