1 dnl Copyright (C) 2012 The Meme Factory, Inc. http://www.meme.com/
2 dnl Copyright (C) 2004, 2008, Karl O. Pinc <kop@meme.com>
4 dnl This file is part of Gombe-MI.
6 dnl Gombe-MI is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; either version 3 of the License, or
9 dnl (at your option) any later version.
11 dnl This program is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 dnl GNU General Public License for more details.
16 dnl You should have received a copy of the GNU General Public License
17 dnl along with Gombe-MI. If not, see <http://www.gnu.org/licenses/>.
19 dnl M4 macros for making functions to support Gombe-MI on the server side.
20 dnl Karl O. Pinc <kop@meme.com>
24 include(`copyright.m4')
25 include(`globalmacros.m4')
27 dnl Don't ouput while defining functions.
31 dnl Grant privliges to a function.
33 dnl This also prints the name of the function. As every function has
34 dnl priviliges granted on it we get to monitor progress this way.
36 dnl Syntax: grant_func_priv(function_declaration)
38 define([grant_func_priv],[
39 GRANT EXECUTE ON FUNCTION $1
40 TO GROUP gombemi_editors;
41 SELECT '$1' AS done_with;
46 dnl Grant everybody privliges to a function.
48 dnl This also prints the name of the function. As every function has
49 dnl priviliges granted on it we get to monitor progress this way.
51 dnl Syntax: grant_everybody_func_priv(function_declaration)
53 define([grant_everybody_func_priv],[
54 GRANT EXECUTE ON FUNCTION $1
55 TO GROUP gombemi_editors;
56 GRANT EXECUTE ON FUNCTION $1
57 TO GROUP gombemi_readers;
58 SELECT '$1' AS done_with;
62 dnl Turn output back on.