_CDB_Group_RemoveMember_API

This commit is contained in:
Juan Ignacio Sánchez Lara
2015-08-17 15:20:15 +02:00
parent e4a56371c0
commit 653eae21b3
2 changed files with 23 additions and 0 deletions

View File

@@ -74,6 +74,7 @@ BEGIN
cdb_group_role := cartodb._CDB_Group_GroupRole(group_name);
cdb_user_role := cartodb._CDB_User_RoleFromUsername(username);
EXECUTE format('REVOKE "%s" FROM "%s"', cdb_group_role, cdb_user_role);
PERFORM cartodb._CDB_Group_RemoveMember_API(current_database(), group_name, username);
END
$$ LANGUAGE PLPGSQL VOLATILE;