CR suggestions (remove appname)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
CREATE TYPE cdb_dataservices_client._entity_config AS (
|
||||
username text,
|
||||
organization_name text,
|
||||
application_name text,
|
||||
apikey_permissions json
|
||||
);
|
||||
|
||||
@@ -37,7 +36,6 @@ BEGIN
|
||||
END IF;
|
||||
result.username = username;
|
||||
result.organization_name = organization_name;
|
||||
result.application_name = apikey_config->'application';
|
||||
result.apikey_permissions = apikey_config->'permissions';
|
||||
RETURN result;
|
||||
END;
|
||||
|
||||
@@ -15,13 +15,12 @@ DECLARE
|
||||
temp_table_name text;
|
||||
username text;
|
||||
orgname text;
|
||||
appname text;
|
||||
apikey_permissions json;
|
||||
BEGIN
|
||||
IF session_user = 'publicuser' OR session_user ~ 'cartodb_publicuser_*' THEN
|
||||
RAISE EXCEPTION 'The api_key must be provided';
|
||||
END IF;
|
||||
SELECT u, o, a, p INTO username, orgname, appname, apikey_permissions FROM cdb_dataservices_client._cdb_entity_config() AS (u text, o text, a text, p json);
|
||||
SELECT u, o, p INTO username, orgname, apikey_permissions FROM cdb_dataservices_client._cdb_entity_config() AS (u text, o text, p json);
|
||||
IF apikey_permissions IS NULL OR NOT apikey_permissions::jsonb ? 'geocoding' THEN
|
||||
RAISE EXCEPTION 'Geocoding is not allowed';
|
||||
END IF;
|
||||
|
||||
Reference in New Issue
Block a user