INSERT, UPDATE und DELETE Recht für web User für tbl_rt_person

This commit is contained in:
Manfred Kindl
2018-10-18 14:38:49 +02:00
parent b3f3dad34e
commit 2ffda4ea4b
+13
View File
@@ -2455,6 +2455,19 @@ if(!$result = @$db->db_query("SELECT lieferant FROM public.tbl_firma LIMIT 1"))
echo '<br>public.tbl_firma: Spalte lieferant hinzugefuegt';
}
// INSERT, UPDATE und DELETE Berechtigungen fuer web User erteilen fuer tbl_rt_person
if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants WHERE table_name='tbl_rt_person' AND table_schema='public' AND grantee='web' AND privilege_type='INSERT'"))
{
if($db->db_num_rows($result)==0)
{
$qry = "GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_rt_person TO web;";
if(!$db->db_query($qry))
echo '<strong>public.tbl_rt_person Berechtigungen: '.$db->db_last_error().'</strong><br>';
else
echo '<br>INSERT, UPDATE und DELETE Rechte fuer public.tbl_rt_person fuer web user gesetzt ';
}
}
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';