<div dir="ltr"><div>Hi Markus,</div><div><br></div><div>Permissions are stored in the tables 'permissions' and 'userflags'</div><div>For instance "tools" is a group of permissions (userflags.flag="tools" with a bit=13), and the permissions table will contain the subpermissions.</div><div><br></div><div>  select * from permissions where module_bit=13;<br></div><div><div>will give your the subpermissions for tools.</div><div><br></div><div>To use the script tools/<a href="http://modborrowers.pl">modborrowers.pl</a> (edit patrons in a batch) you will need the subpermission edit_patrons of the tools module. If you edit this file you will find the following line:</div><div>  flagsrequired   => { tools => "edit_patrons" }<br></div><div><br></div><div>The CAN_* flags in the template are set in C4::Auth</div><div>"CAN_user_tools" means all the "tools" subpermissions</div><div>CAN_user_tools_edit_patrons means the edit_patrons subpermission of the "tools" module.</div><div><br></div><div>Take a look at <br></div><div>  commit  f56d6530bc7ea00db0d2b158a8b2667d5ba16a41<br>  Bug 16978: Add delete reports user permission<br></div><div>it added the "reports => delete_reports" subpermission.<br></div><div><br></div><div>Good luck :)<br></div><div>Hope that makes sense!</div><div><br></div><div>Jonathan<br></div><div><br></div><div><div class="gmail_quote"><div dir="ltr">On Wed, 13 Jun 2018 at 16:58 Chris Cormack <<a href="mailto:chrisc@catalyst.net.nz">chrisc@catalyst.net.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Kia ora Markus<br>
<br>
Shifting this over to the development list.<br>
As you are more likely to get an answer there.<br>
<br>
If no one has answered by the time I get in front of a computer, I'll try :)<br>
<br>
Chris <br><br><div class="gmail_quote"></div></div><div><div class="gmail_quote">On 14 June 2018 7:02:30 AM NZST, Markus Becker <<a href="mailto:beckmarkus@gmail.com" target="_blank">beckmarkus@gmail.com</a>> wrote:</div></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><pre class="m_2074963691664025395k9mail">Dear Koha-Community,<br><br>i did not find any hint oder documentation, where the permissions for<br>using tools etc. are stored.<br><br>My example:<br>For testing purpose i want to insert my own perl-script into Koha and<br>it should appear on the "tools"-page.<br><br>The links on this page are shown to the user or not depending on the<br>permissions he has:<br>(<a href="http://tools-home.tt" target="_blank">tools-home.tt</a>)<br><br> [% IF ( CAN_user_tools_manage_staged_marc ) %]<br> <dt><a href="/cgi-bin/koha/tools/<a href="http://bibliotheca_convert.pl" target="_blank">bibliotheca_convert.pl</a>">Bibliotheca-Datei<br>hochladen</a></dt><br> <dd>Werkzeug um BIBLIOTHECAplus-Exportdatei für den Import hochzuladen</dd><br> [% END %]<br><br>I can not find the place, where these rights are deposited. How does<br>Koha know if a certain right is existing?<br>I found the file permissions.inc but changes there did not having any effect.<br><br>Of cource i could use the permission<br>"CAN_user_tools_manage_staged_marc" for my own script (and then the<br>link is shown), but IMHO it would be not correct to "steal" the<br>permission of another script.<br><br>I would be very grateful if someone could give me a hint how to<br>introduce the permission to start my script to Koha.<br><br>Thank You very much in Advance,<br>Markus Becker<br><hr><br></pre></blockquote></div></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><pre class="m_2074963691664025395k9mail">Koha mailing list  <a href="http://koha-community.org" target="_blank">http://koha-community.org</a><br><a href="mailto:Koha@lists.katipo.co.nz" target="_blank">Koha@lists.katipo.co.nz</a><br><a href="https://lists.katipo.co.nz/mailman/listinfo/koha" target="_blank">https://lists.katipo.co.nz/mailman/listinfo/koha</a><br></pre></blockquote></div></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><pre class="m_2074963691664025395k9mail"></pre></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</div>_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org/</a></blockquote></div></div></div></div>