Add needed security definer to config function

This commit is contained in:
Mario de Frutos
2016-01-26 12:46:05 +01:00
parent 5309a6eae5
commit 35b59c448f
2 changed files with 4 additions and 2 deletions

View File

@@ -47,6 +47,7 @@ RETURNS boolean AS $$
}
return True
$$ LANGUAGE plpythonu;
-- Get the Redis configuration from the _conf table --
CREATE OR REPLACE FUNCTION cdb_geocoder_server._get_geocoder_config(username text, orgname text)
RETURNS boolean AS $$
@@ -71,7 +72,8 @@ RETURNS boolean AS $$
# --for this user session but...
GD[cache_key] = geocoder_config
return True
$$ LANGUAGE plpythonu;
$$ LANGUAGE plpythonu SECURITY DEFINER;
-- Geocodes a street address given a searchtext and a state and/or country
CREATE OR REPLACE FUNCTION cdb_geocoder_server.cdb_geocode_street_point_v2(username TEXT, orgname TEXT, searchtext TEXT, city TEXT DEFAULT NULL, state_province TEXT DEFAULT NULL, country TEXT DEFAULT NULL)
RETURNS Geometry AS $$

View File

@@ -22,4 +22,4 @@ RETURNS boolean AS $$
# --for this user session but...
GD[cache_key] = geocoder_config
return True
$$ LANGUAGE plpythonu;
$$ LANGUAGE plpythonu SECURITY DEFINER;