how to use lua script

hi … i need a help with a lua script … i don´t know how to use the script for the access control to the web services, i only want that the admin user can erase the patient and the others one not.

where can i put this part on the orthanc.json

Hello,

This topic is covered in the Orthanc Book:
https://book.orthanc-server.com/users/lua.html#installing-a-lua-script

https://book.orthanc-server.com/users/lua.html#filtering-incoming-rest-requests

Sébastien-