Support user consent flow (#1293)
* Introduce user consent flow * Add permissions to confirmation management * rename from consent to confirmation * Reformat code. Remove unused imports. Change and add permission checks when configuring auto-confirmation. * Do not include null values for DDI confirmation base endpoint * fix confirmation required checkbox id * Remove unused import. Fix consume/produce type of new API's. * Change term processing to proceeding when activating user consent flow * Align formatting and extend integration test cases for DMF and DDI. * Extend DMF test cases to consider auto-confirmation * Refactor action management to fix problem of handling action status updates on closed actions. * remove unsupported validation * use new confirmation api for DMF. Extend test cases., * Remove unnecessary fields. * Extend API documentation for DDI and MGMT API. * adapt ddi api docs adoc file * Fixed the duplicate migration version for db files * fix method to support confirmation * Fixed PR comments * Addressed PR comments * Fixed after merge compilation issue * Fixed after merge compilation issue * Fix failing tests in MgmtRolloutResourceTest * Fixed the permissions issue reflected by integration tests * Added back the missing line of code lost during merge * Fix the failing test on Jenkins Signed-off-by: Stanislav Trailov <stanislav.trailov@bosch.io> Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io> Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io> Signed-off-by: Shruthi Manavalli Ramanna <shruthimanavalli.ramanna@bosch-si.com> Co-authored-by: Shruthi Manavalli Ramanna <shruthimanavalli.ramanna@bosch-si.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
ALTER TABLE sp_rolloutgroup ADD COLUMN confirmation_required BOOLEAN;
|
||||
UPDATE sp_rolloutgroup SET confirmation_required = 0;
|
||||
|
||||
ALTER TABLE sp_target_filter_query ADD COLUMN confirmation_required BOOLEAN;
|
||||
UPDATE sp_target_filter_query SET confirmation_required = 0;
|
||||
|
||||
CREATE TABLE sp_target_conf_status
|
||||
(
|
||||
id BIGINT GENERATED always AS IDENTITY NOT NULL,
|
||||
target_id bigint not null,
|
||||
initiator VARCHAR(64),
|
||||
remark VARCHAR(512),
|
||||
created_at BIGINT,
|
||||
created_by VARCHAR(64),
|
||||
last_modified_at BIGINT,
|
||||
last_modified_by VARCHAR(64),
|
||||
optlock_revision BIGINT,
|
||||
tenant VARCHAR(40) not null,
|
||||
primary key (id)
|
||||
);
|
||||
ALTER TABLE sp_target_conf_status
|
||||
ADD CONSTRAINT fk_target_auto_conf FOREIGN KEY (target_id) REFERENCES sp_target (id) ON DELETE CASCADE;
|
||||
@@ -0,0 +1,22 @@
|
||||
ALTER TABLE sp_rolloutgroup ADD column confirmation_required BOOLEAN;
|
||||
UPDATE sp_rolloutgroup SET confirmation_required = 0;
|
||||
|
||||
ALTER TABLE sp_target_filter_query ADD column confirmation_required BOOLEAN;
|
||||
UPDATE sp_target_filter_query SET confirmation_required = 0;
|
||||
|
||||
create table sp_target_conf_status
|
||||
(
|
||||
id bigint not null auto_increment,
|
||||
target_id bigint not null,
|
||||
initiator varchar(64),
|
||||
remark VARCHAR(512),
|
||||
created_at bigint,
|
||||
created_by varchar(64),
|
||||
last_modified_at bigint,
|
||||
last_modified_by varchar(64),
|
||||
optlock_revision bigint,
|
||||
tenant varchar(40) not null,
|
||||
primary key (id)
|
||||
);
|
||||
ALTER TABLE sp_target_conf_status
|
||||
ADD CONSTRAINT fk_target_auto_conf FOREIGN KEY (target_id) REFERENCES sp_target (id) ON DELETE CASCADE;
|
||||
@@ -0,0 +1,22 @@
|
||||
ALTER TABLE sp_rolloutgroup ADD column confirmation_required BOOLEAN;
|
||||
UPDATE sp_rolloutgroup SET confirmation_required = 0;
|
||||
|
||||
ALTER TABLE sp_target_filter_query ADD column confirmation_required BOOLEAN;
|
||||
UPDATE sp_target_filter_query SET confirmation_required = 0;
|
||||
|
||||
create table sp_target_conf_status
|
||||
(
|
||||
id bigint not null auto_increment,
|
||||
target_id bigint not null,
|
||||
initiator varchar(64),
|
||||
remark varchar(512),
|
||||
created_at bigint,
|
||||
created_by varchar(64),
|
||||
last_modified_at bigint,
|
||||
last_modified_by varchar(64),
|
||||
optlock_revision bigint,
|
||||
tenant varchar(40) not null,
|
||||
primary key (id)
|
||||
);
|
||||
ALTER TABLE sp_target_conf_status
|
||||
ADD CONSTRAINT fk_target_auto_conf FOREIGN KEY (target_id) REFERENCES sp_target (id) ON DELETE CASCADE;
|
||||
@@ -1,3 +1,3 @@
|
||||
ALTER TABLE sp_distribution_set ADD COLUMN valid BOOLEAN;
|
||||
|
||||
UPDATE sp_distribution_set SET valid = 1;
|
||||
UPDATE sp_distribution_set SET valid = TRUE;
|
||||
@@ -1,3 +1,3 @@
|
||||
ALTER TABLE sp_base_software_module ADD COLUMN encrypted BOOLEAN;
|
||||
|
||||
UPDATE sp_base_software_module SET encrypted = 0;
|
||||
UPDATE sp_base_software_module SET encrypted = FALSE;
|
||||
@@ -1 +1 @@
|
||||
ALTER TABLE sp_target_type ALTER COLUMN name VARCHAR (128);
|
||||
ALTER TABLE sp_target_type ALTER COLUMN name TYPE VARCHAR (128);
|
||||
@@ -1,4 +1,4 @@
|
||||
ALTER TABLE sp_action_status ADD code INTEGER;
|
||||
ALTER TABLE sp_action_status ADD COLUMN code INTEGER;
|
||||
CREATE INDEX sp_idx_action_status_03
|
||||
ON sp_action_status
|
||||
USING BTREE (tenant, code);
|
||||
@@ -0,0 +1,26 @@
|
||||
ALTER TABLE sp_rolloutgroup
|
||||
ADD COLUMN confirmation_required BOOLEAN;
|
||||
ALTER TABLE sp_target_filter_query
|
||||
ADD COLUMN confirmation_required BOOLEAN;
|
||||
|
||||
UPDATE sp_rolloutgroup SET confirmation_required = FALSE;
|
||||
UPDATE sp_target_filter_query SET confirmation_required = FALSE;
|
||||
|
||||
CREATE TABLE sp_target_conf_status
|
||||
(
|
||||
id BIGSERIAL,
|
||||
target_id BIGINT NOT NULL,
|
||||
initiator VARCHAR(64),
|
||||
remark VARCHAR(512),
|
||||
tenant VARCHAR(40) NOT NULL,
|
||||
created_at BIGINT NOT NULL,
|
||||
created_by VARCHAR(64) NOT NULL,
|
||||
last_modified_at BIGINT NOT NULL,
|
||||
last_modified_by VARCHAR(64) NOT NULL,
|
||||
optlock_revision BIGINT NULL
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE sp_target_conf_status
|
||||
ADD CONSTRAINT pk_sp_target_conf_status PRIMARY KEY (id);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
ALTER TABLE sp_rolloutgroup ADD confirmation_required BIT DEFAULT 0;
|
||||
ALTER TABLE sp_target_filter_query ADD confirmation_required BIT DEFAULT 0;
|
||||
|
||||
CREATE TABLE sp_target_conf_status
|
||||
(
|
||||
id NUMERIC(19) IDENTITY NOT NULL,
|
||||
target_id NUMERIC(19) NOT NULL,
|
||||
initiator VARCHAR(64),
|
||||
remark VARCHAR(512),
|
||||
tenant VARCHAR(40) NOT NULL,
|
||||
created_at NUMERIC(19) NOT NULL,
|
||||
created_by VARCHAR(64) NOT NULL,
|
||||
last_modified_at NUMERIC(19) NOT NULL,
|
||||
last_modified_by VARCHAR(64) NOT NULL,
|
||||
optlock_revision INTEGER NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
ALTER TABLE sp_target_conf_status
|
||||
ADD CONSTRAINT fk_target_auto_conf FOREIGN KEY (target_id) REFERENCES sp_target (id) ON DELETE CASCADE;
|
||||
Reference in New Issue
Block a user