Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
Fix database nsm_target IcingaCommandRestrictions
Browse files Browse the repository at this point in the history
for MySQL and PgSQL - Schema and Update for upcoming 1.8.1
(refs #3457)
  • Loading branch information
lazyfrosch committed Nov 22, 2012
1 parent 753cafe commit d7d04f4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions etc/schema/mysql.sql
Expand Up @@ -61,7 +61,7 @@ INSERT INTO nsm_target (target_id,target_name,target_description,target_class,ta
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('16','icinga.cronk.log','Allow user to view icinga-log','','credential');
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('17','icinga.control.view','Allow user to view icinga status','','credential');
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('18','icinga.control.admin','Allow user to administrate the icinga process','','credential');
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('19','IcingaCommandRestrictions','Disable critical commands for this user','','icinga');
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('19','IcingaCommandRestrictions','Disable critical commands for this user','IcingaDataCommandRestrictionPrincipalTarget','icinga');
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('20','icinga.cronk.custom','Allow user to create and modify custom cronks','','credential');
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('21','icinga.cronk.admin','Allow user to edit and delete all cronks','','credential');
INSERT INTO nsm_target (target_id,target_name,target_description,target_class,target_type) VALUES ('22','IcingaService','Limit data access to specific services','IcingaDataServicePrincipalTarget','icinga');
Expand Down Expand Up @@ -90,4 +90,4 @@ INSERT INTO nsm_principal_target (pt_id,pt_principal_id,pt_target_id) VALUES ('1
INSERT INTO nsm_principal_target (pt_id,pt_principal_id,pt_target_id) VALUES ('13','3','21');
INSERT INTO nsm_user_role (usro_user_id,usro_role_id) VALUES ('1','1');
INSERT INTO nsm_user_role (usro_user_id,usro_role_id) VALUES ('1','2');
INSERT INTO nsm_user_role (usro_user_id,usro_role_id) VALUES ('1','3');
INSERT INTO nsm_user_role (usro_user_id,usro_role_id) VALUES ('1','3');
2 changes: 1 addition & 1 deletion etc/schema/pgsql.sql
Expand Up @@ -742,7 +742,7 @@ COPY nsm_target (target_id, target_name, target_description, target_class, targe
16 icinga.cronk.log Allow user to view icinga-log credential
17 icinga.control.view Allow user to view icinga status credential
18 icinga.control.admin Allow user to administrate the icinga process credential
19 IcingaCommandRestrictions Disable critical commands for this user \N icinga
19 IcingaCommandRestrictions Disable critical commands for this user IcingaDataCommandRestrictionPrincipalTarget icinga
20 icinga.cronk.custom Allow user to create and modify custom cronks \N credential
21 icinga.cronk.admin Allow user to edit and delete all cronks credential
22 IcingaService Limit data access to specific services IcingaDataServicePrincipalTarget icinga
Expand Down
5 changes: 5 additions & 0 deletions etc/schema/updates/mysql/mysql_v1-8-0_to_v-1-8-1.sql
@@ -0,0 +1,5 @@
DELETE FROM nsm_db_version;
INSERT INTO nsm_db_version VALUES ('1','icinga-web/v1.8.1', NOW(), NOW());

UPDATE nsm_target SET target_class = 'IcingaDataCommandRestrictionPrincipalTarget' WHERE target_name = 'IcingaCommandRestrictions';

5 changes: 5 additions & 0 deletions etc/schema/updates/pgsql/pgsql_v1-8-0_to_v-1-8-1.sql
@@ -0,0 +1,5 @@
DELETE FROM nsm_db_version;
INSERT INTO nsm_db_version VALUES ('1','icinga-web/v1.8.1', NOW(), NOW());

UPDATE nsm_target SET target_class = 'IcingaDataCommandRestrictionPrincipalTarget' WHERE target_name = 'IcingaCommandRestrictions';

0 comments on commit d7d04f4

Please sign in to comment.