From 5450d0b7607bfe98552344fb9e8a640df2a9b70f Mon Sep 17 00:00:00 2001 From: Olli-Antti Kivilahti Date: Wed, 5 Feb 2014 20:03:37 +0200 Subject: [PATCH] C4::Auth.pm Documentation improvement check_cookie_auth() didn't describe the content and how to use the permissions hash and I had to rummage through code to figure out how the flags are properly passed. I hope this will help the next one not to take that hit. http://bugs.koha-community.org/show_bug.cgi?id=11676 --- C4/Auth.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/Auth.pm b/C4/Auth.pm index 44edf67..ee0fb81 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1378,6 +1378,9 @@ sub check_api_auth { Given a CGISESSID cookie set during a previous login to Koha, determine if the user has the privileges specified by C<$userflags>. +C<$userflags> is a hash of module => subpermission, eg +{ tools => 'upload_local_cover_images', catalogue => '*' } + C is meant for authenticating special services such as tools/upload-file.pl that are invoked by other pages that have been authenticated in the usual way. -- 1.8.1.2