#1681 add all used permissions to db
Merged 2 years ago by tkopecek. Opened 2 years ago by tkopecek.
tkopecek/koji issue1637  into  master

@@ -81,4 +81,13 @@ 

  ALTER TABLE content_generator ADD UNIQUE (name);

  ALTER TABLE content_generator ALTER COLUMN name SET NOT NULL;

  

+ 

+ -- add all basic permissions

+ INSERT INTO permissions (name) VALUES ('dist-repo') ON CONFLICT DO NOTHING;

+ INSERT INTO permissions (name) VALUES ('host') ON CONFLICT DO NOTHING;

+ INSERT INTO permissions (name) VALUES ('image-import') ON CONFLICT DO NOTHING;

+ INSERT INTO permissions (name) VALUES ('sign') ON CONFLICT DO NOTHING;

+ INSERT INTO permissions (name) VALUES ('tag') ON CONFLICT DO NOTHING;

+ INSERT INTO permissions (name) VALUES ('target') ON CONFLICT DO NOTHING;

+ 

  COMMIT;

file modified
+9 -3
@@ -54,14 +54,20 @@ 

  

  -- Some basic perms

  INSERT INTO permissions (name) VALUES ('admin');

+ INSERT INTO permissions (name) VALUES ('appliance');

  INSERT INTO permissions (name) VALUES ('build');

- INSERT INTO permissions (name) VALUES ('repo');

+ INSERT INTO permissions (name) VALUES ('dist-repo');

+ INSERT INTO permissions (name) VALUES ('host');

  INSERT INTO permissions (name) VALUES ('image');

+ INSERT INTO permissions (name) VALUES ('image-import');

  INSERT INTO permissions (name) VALUES ('livecd');

  INSERT INTO permissions (name) VALUES ('maven-import');

- INSERT INTO permissions (name) VALUES ('win-import');

+ INSERT INTO permissions (name) VALUES ('repo');

+ INSERT INTO permissions (name) VALUES ('sign');

+ INSERT INTO permissions (name) VALUES ('tag');

+ INSERT INTO permissions (name) VALUES ('target');

  INSERT INTO permissions (name) VALUES ('win-admin');

- INSERT INTO permissions (name) VALUES ('appliance');

+ INSERT INTO permissions (name) VALUES ('win-import');

  

  CREATE TABLE user_perms (

  	user_id INTEGER NOT NULL REFERENCES users(id),