mod_data_access/mod_data_access.lua
changeset 2876 8f17da746479
parent 1343 7dbde05b48a9
equal deleted inserted replaced
2875:c3317f61f3f9 2876:8f17da746479
    82 	if not p_store or not p_store:match("^[%a_]+$") then
    82 	if not p_store or not p_store:match("^[%a_]+$") then
    83 		return 404;
    83 		return 404;
    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 access 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(authed_user, 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