Do not allow cartodbfying tables while no user quota is set

Closes #17
Updates tests
This commit is contained in:
Sandro Santilli
2014-05-12 13:07:47 +02:00
parent e6b02de9aa
commit f98071cdac
7 changed files with 28 additions and 3 deletions

View File

@@ -10,7 +10,13 @@ EXCEPTION
RETURNS void AS '' LANGUAGE 'sql';
END;
$$ LANGUAGE 'plpgsql';
--SELECT tmp();
-- Set user quota to infinite
SELECT CDB_SetUserQuotaInBytes(0);
cdb_setuserquotainbytes
-------------------------
0
(1 row)
create schema c;
CREATE USER cartodb_postgresql_unpriv_user;
GRANT ALL ON SCHEMA c to cartodb_postgresql_unpriv_user;
@@ -207,3 +213,4 @@ select count(*) from CDB_TableMetadata;
(1 row)
DROP USER cartodb_postgresql_unpriv_user;
DROP FUNCTION _CDB_UserQuotaInBytes();