Secured configuration access

This commit is contained in:
Juan Ignacio Sánchez Lara
2015-08-19 11:20:06 +02:00
parent e1dde3c36c
commit 70fe432102
2 changed files with 11 additions and 2 deletions

View File

@@ -1,3 +1,10 @@
----------------------------------
-- CONF MANAGEMENT FUNCTIONS
--
-- Meant to be used by superadmin user.
-- Functions needing reading configuration should use SECURITY DEFINER.
----------------------------------
-- This will trigger NOTICE if CDB_CONF already exists
DO LANGUAGE 'plpgsql' $$
BEGIN
@@ -32,7 +39,7 @@ BEGIN
EXECUTE 'select cartodb._CDB_Conf_Cache(''get'', $1) as conf;' INTO conf USING param;
RETURN conf;
END
$$ LANGUAGE PLPGSQL STABLE SECURITY DEFINER;
$$ LANGUAGE PLPGSQL STABLE;
-- Single cache function allowing SD private dict usage
CREATE OR REPLACE