projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Datenbank anlegen: Super-User-Rechte abfragen, sofern nötig
[kivitendo-erp.git]
/
SL
/
DBUtils.pm
diff --git
a/SL/DBUtils.pm
b/SL/DBUtils.pm
index
54cf7da
..
c9c70c9
100644
(file)
--- 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;