A lot of works different areas... no plan

This commit is contained in:
Janus C. H. Knudsen 2025-02-16 23:39:26 +01:00
parent 087f8ce0e9
commit 1aea1e894a
16 changed files with 1433 additions and 131 deletions

View file

@ -0,0 +1,40 @@
GRANT USAGE ON SCHEMA "system" TO heimdall;
GRANT CREATE ON SCHEMA "system" TO heimdall
create schema "system"
ALTER DEFAULT PRIVILEGES FOR ROLE heimdall IN SCHEMA "system"
GRANT ALL PRIVILEGES ON TABLES TO heimdall;
-- Og for eksisterende tabeller
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA "system" TO heimdall;
ALTER TABLE susers OWNER TO db_admin;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA your_schema TO sathumper;
CREATE ROLE heimdall WITH LOGIN PASSWORD '3911';
COMMENT ON ROLE heimdall IS 'Security auditor and guardian';
drop role heimdall
set role 'heimdall'
ALTER ROLE heimdall SET search_path = "system"
drop table system.foo
SELECT CURRENT_ROLE;
SELECT rolname FROM pg_roles
select system_user()
SET ROLE heimdall;
RESET ALL; -- Nulstil alle sessionsvariabler til deres standardværdier
SHOW search_path; -- Burde nu vise den konfigurerede værdi
SHOW search_path;
create table system.foos(id int)
select * from system.foo

View file

@ -19,9 +19,6 @@ WHERE useconfig IS NOT NULL
ALTER ROLE sathumper1 SET search_path='ss32'
CREATE USER fm WITH PASSWORD 'asd'
await _db.ExecuteAsync(sql);