comparison mod_data_access/mod_data_access.lua @ 1018:7e060edbb548

mod_data_access: is_admin() takes a JID, not a username (fixes admin access to data stores)
author Matthew Wild <mwild1@gmail.com>
date Thu, 23 May 2013 13:54:08 +0100
parents dd7d30c175d4
children 7dbde05b48a9
comparison
equal deleted inserted replaced
1017:28e3257d2ae5 1018:7e060edbb548
84 end 84 end
85 85
86 if user_host ~= path_items[1] or user_node ~= path_items[2] then 86 if user_host ~= path_items[1] or user_node ~= path_items[2] then
87 -- To only give admins acces to anything, move the inside of this block after authz 87 -- To only give admins acces to anything, move the inside of this block after authz
88 --module:log("debug", "%s wants access to %s@%s[%s], is admin?", authed_user, p_user, p_host, p_store) 88 --module:log("debug", "%s wants access to %s@%s[%s], is admin?", authed_user, p_user, p_host, p_store)
89 if not is_admin(user_node, p_host) then 89 if not is_admin(authed_user, p_host) then
90 return 403; 90 return 403;
91 end 91 end
92 end 92 end
93 93
94 local method = request.method; 94 local method = request.method;