X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/511d3561ad2e8fd8bc16cffe9b085f043062f7f3..be54aea5115bbfcc5d91de846879126417cacdbd:/SL/DBUtils.pm diff --git a/SL/DBUtils.pm b/SL/DBUtils.pm index 54cf7da17..c9c70c95a 100644 --- a/SL/DBUtils.pm +++ b/SL/DBUtils.pm @@ -392,6 +392,13 @@ sub like { return "%" . SL::Util::trim($string // '') . "%"; } +sub role_is_superuser { + my ($dbh, $login) = @_; + my ($is_superuser) = $dbh->selectrow_array(qq|SELECT usesuper FROM pg_user WHERE usename = ?|, undef, $login); + + return $is_superuser; +} + 1;