From 726f3c31f79794f6c53eef3d4eb9e069cd6a44e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Ignacio=20S=C3=A1nchez=20Lara?= Date: Wed, 19 Aug 2015 11:03:07 +0200 Subject: [PATCH] Documentation about roles and functions --- scripts-available/CDB_Groups.sql | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts-available/CDB_Groups.sql b/scripts-available/CDB_Groups.sql index 02da75f..220f403 100644 --- a/scripts-available/CDB_Groups.sql +++ b/scripts-available/CDB_Groups.sql @@ -1,3 +1,9 @@ +---------------------------------- +-- GROUP MANAGEMENT FUNCTIONS +-- +-- Meant to be used by org admin. See CDB_Organization_AddAdmin. +---------------------------------- + -- Creates a new group CREATE OR REPLACE FUNCTION cartodb.CDB_Group_CreateGroup(group_name text) @@ -78,6 +84,12 @@ BEGIN END $$ LANGUAGE PLPGSQL VOLATILE; +---------------------------------- +-- TABLE MANAGEMENT FUNCTIONS +-- +-- Meant to be used by table owners. +---------------------------------- + -- Grants table read permission to a group CREATE OR REPLACE FUNCTION cartodb.CDB_Group_Table_GrantRead(group_name text, username text, table_name text) @@ -117,7 +129,7 @@ END $$ LANGUAGE PLPGSQL VOLATILE; ----------------------- --- Private functions +-- Helper functions ----------------------- -- Given a group name returns a role. group_name must be a valid PostgreSQL idenfifier. See http://www.postgresql.org/docs/9.2/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS CREATE OR REPLACE