-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: redirect the reporter when trying to access immutable application
- Loading branch information
1 parent
6d0665d
commit b0f7208
Showing
7 changed files
with
124 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...deploy/computed_columns/application_application_revision_by_string_version_number.sql.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-- Deploy ggircs-portal:computed_columns/application_application_revision_by_string_version_number.sql to pg | ||
|
||
begin; | ||
|
||
create or replace function ggircs_portal.application_application_revision_by_string_version_number ( | ||
application ggircs_portal.application, version_number_input text | ||
) returns ggircs_portal.application_revision | ||
as $function$ | ||
begin | ||
return (select r.* from ggircs_portal.application_revision r | ||
where r.application_id = application_id | ||
and r.version_number = version_number_input::int); | ||
end; | ||
$function$ language 'plpgsql' stable; | ||
|
||
grant execute on function ggircs_portal.application_application_revision_by_string_version_number to ciip_administrator, ciip_analyst, ciip_industry_user; | ||
|
||
comment on function ggircs_portal.application_latest_draft_revision is 'Computed column for graphql to retrieve a given application_revision when given a version number as String (e.g. from a router query)'; | ||
|
||
commit; |
7 changes: 7 additions & 0 deletions
7
...revert/computed_columns/application_application_revision_by_string_version_number.sql.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Revert ggircs-portal:computed_columns/application_application_revision_by_string_version_number.sql from pg | ||
|
||
begin; | ||
|
||
drop function ggircs_portal.application_application_revision_by_string_version_number(ggircs_portal.application, text); | ||
|
||
commit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...verify/computed_columns/application_application_revision_by_string_version_number.sql.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Verify ggircs-portal:computed_columns/application_application_revision_by_string_version_number.sql on pg | ||
|
||
begin; | ||
|
||
select pg_get_functiondef('ggircs_portal.application_application_revision_by_string_version_number(ggircs_portal.application, text)'::regprocedure); | ||
|
||
rollback; |