Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First commit #566

Merged
merged 24 commits into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bae75d9
First commit
rstens Oct 4, 2021
346df64
Merge branch 'dev' into Sec-updates/documentation
rstens Oct 4, 2021
c50e729
Merge branch 'dev' into Sec-updates/documentation
rstens Oct 6, 2021
a4434ea
Merge branch 'dev' into Sec-updates/documentation
rstens Oct 7, 2021
afdf0d0
Upload
rstens Oct 7, 2021
95ce546
Merge branch 'dev' into Sec-updates/documentation
rstens Oct 12, 2021
e61e6cc
Merge branch 'dev' into Sec-updates/documentation
rstens Oct 12, 2021
638a871
Merge branch 'dev' into Sec-updates/documentation
rstens Oct 12, 2021
37c889a
Update the sec produre for unseceruing an attachment
rstens Oct 13, 2021
dc72786
Merge branch 'dev' into Sec-updates/documentation
rstens Oct 13, 2021
cffcfb9
Version update
rstens Oct 15, 2021
b70d50e
Merge branch 'dev' into Sec-updates/documentation
rstens Oct 15, 2021
ade51bb
Update for single upload button
rstens Oct 15, 2021
9cb5763
Merge branch 'Sec-updates/documentation' of https://github.com/bcgov/…
rstens Oct 15, 2021
cad78a1
New fixtures
rstens Oct 15, 2021
16b6bd9
Merge branch 'dev' into Sec-updates/documentation
rstens Oct 15, 2021
b112be4
Merge branch 'dev' into Sec-updates/documentation
rstens Oct 15, 2021
485a441
Update
rstens Oct 19, 2021
239b25d
Merge branch 'dev' into Sec-updates/documentation
rstens Oct 19, 2021
29ed70a
Merge branch 'dev' into Sec-updates/documentation
rstens Oct 19, 2021
dc344c3
Merge branch 'dev' into Sec-updates/documentation
rstens Oct 19, 2021
51ce41c
Survey script
rstens Oct 19, 2021
c074b29
delete survey
rstens Oct 20, 2021
9b0ceac
Spacing
rstens Oct 20, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ jobs:

cypress-run:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == false && github.event.pull_request.draft == false && github.base_ref != 'prod' }}
env:
CYPRESS_RECORD_KEY: ${{ secrets.RECORDING_KEY }}
CYPRESS_username: ${{ secrets.CYPRESS_USER_NAME }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deployStatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ jobs:

cypress-run:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.draft == false && github.base_ref != 'prod' }}
env:
CYPRESS_RECORD_KEY: ${{ secrets.RECORDING_KEY }}
CYPRESS_username: ${{ secrets.CYPRESS_USER_NAME }}
Expand Down
10 changes: 5 additions & 5 deletions database/src/migrations/20210715170002_security_procedures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ $$;
declare

begin
perform ${DB_SCHEMA}.api_apply_security_rule(security_rule_id) from ${DB_SCHEMA}.security_rule;
perform ${DB_SCHEMA}.api_apply_security_rule(security_rule_id) from ${DB_SCHEMA}.security_rule where system_rule = false;
perform ${DB_SCHEMA}.api_security_maintenance();
end;
$BODY$;
Expand Down Expand Up @@ -365,7 +365,7 @@ $$;
execute format('select security_rule_id from ${DB_SCHEMA}.security_rule where rule_definition ->> ''target'' = lower(''%1$s'') and system_rule=true', __table_name) into v_security_rule_id;

-- Secure the record
execute format('select ${DB_SCHEMA}.api_secure_record(%1$s, lower(''%2$s''), %3$s, api_get_context_user_id(),%4$s)', __id,__table_name,v_security_rule_id, __project_id);
execute format('select ${DB_SCHEMA}.api_secure_record(%1$s, lower(''%2$s''), %3$s, NULL,%4$s)', __id,__table_name,v_security_rule_id, __project_id);

return true;
end;
Expand All @@ -374,7 +374,7 @@ $$;
ALTER FUNCTION ${DB_SCHEMA}.api_secure_attachment_record(integer, character varying, integer)
OWNER TO postgres;

CREATE OR REPLACE FUNCTION ${DB_SCHEMA}.api_unsecure_attachment_record(__table_name character varying, __security_token uuid)
CREATE OR REPLACE FUNCTION ${DB_SCHEMA}.api_unsecure_attachment_record(__table_name character varying, __security_token uuid)
RETURNS boolean
LANGUAGE 'plpgsql'
COST 100
Expand All @@ -396,8 +396,8 @@ $$;

begin

execute format('delete from ${DB_SCHEMA}.security where security_token = ''%1$s''', __security_token);
execute format('update ${DB_SCHEMA}.%1$s set security_token = null where security_token = ''%2$s''', __table_name, __security_token);
execute format('update ${DB_SCHEMA}.%1$s set security_token = null where security_token = (select security_token from ${DB_SCHEMA}.security where security_token = ''%2$s'' group by security_token having count(*) = 1)', __table_name, __security_token);
execute format('delete from ${DB_SCHEMA}.security where security_token = ''%1$s'' and security_rule_id in (select security_rule_id from ${DB_SCHEMA}.security_rule where system_rule = true)', __security_token);

return true;
end;
Expand Down
Binary file added testing/e2e/cypress/fixtures/shapes/1.zip
Binary file not shown.
Loading