feature/credentials-schema-updates (#180)
Co-authored-by: Michael Hoennig <michael@hoennig.de> Reviewed-on: https://dev.hostsharing.net/hostsharing/hs.hsadmin.ng/pulls/180 Reviewed-by: Marc Sandlus <marc.sandlus@hostsharing.net>
This commit is contained in:
@@ -13,11 +13,12 @@ create table hs_credentials.credentials
|
||||
person_uuid uuid not null references hs_office.person(uuid),
|
||||
|
||||
active bool,
|
||||
last_used timestamp,
|
||||
global_uid int unique, -- w/o
|
||||
global_gid int unique, -- w/o
|
||||
onboarding_token text, -- w/o
|
||||
onboarding_token text, -- w/o, but can be set to null to invalidate
|
||||
|
||||
two_factor_auth text,
|
||||
totp_secret text,
|
||||
phone_password text,
|
||||
email_address text,
|
||||
sms_number text
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ begin
|
||||
-- call rbac.grantRoleToRole(hs_credentials.context_REFERRER(context_MATRIX_internal), rbac.global_ADMIN());
|
||||
|
||||
-- Add test credentials (linking to assumed rbac.subject UUIDs)
|
||||
INSERT INTO hs_credentials.credentials (uuid, version, person_uuid, active, global_uid, global_gid, onboarding_token, two_factor_auth, phone_password, email_address, sms_number) VALUES
|
||||
INSERT INTO hs_credentials.credentials (uuid, version, person_uuid, active, global_uid, global_gid, onboarding_token, totp_secret, phone_password, email_address, sms_number) VALUES
|
||||
( superuserAlexSubjectUuid, 0, personAlexUuid, true, 1001, 1001, 'token-abc', 'otp-secret-1', 'phone-pw-1', 'alex@example.com', '111-222-3333'),
|
||||
( superuserFranSubjectUuid, 0, personFranUuid, true, 1002, 1002, 'token-def', 'otp-secret-2', 'phone-pw-2', 'fran@example.com', '444-555-6666');
|
||||
|
||||
|
||||
@@ -174,59 +174,61 @@ databaseChangeLog:
|
||||
|
||||
- include:
|
||||
file: db/changelog/6-hs-booking/600-hs-booking-schema.sql
|
||||
context: "!only-office"
|
||||
context: "!only-prod-schema"
|
||||
- include:
|
||||
file: db/changelog/6-hs-booking/610-booking-debitor/6100-hs-booking-debitor.sql
|
||||
context: "!only-office"
|
||||
context: "!only-prod-schema"
|
||||
- include:
|
||||
file: db/changelog/6-hs-booking/620-booking-project/6200-hs-booking-project.sql
|
||||
context: "!only-office"
|
||||
context: "!only-prod-schema"
|
||||
- include:
|
||||
file: db/changelog/6-hs-booking/620-booking-project/6203-hs-booking-project-rbac.sql
|
||||
context: "!only-office"
|
||||
context: "!only-prod-schema"
|
||||
- include:
|
||||
file: db/changelog/6-hs-booking/620-booking-project/6208-hs-booking-project-test-data.sql
|
||||
context: "!only-office and !without-test-data"
|
||||
context: "!only-prod-schema and !without-test-data"
|
||||
- include:
|
||||
file: db/changelog/6-hs-booking/630-booking-item/6300-hs-booking-item.sql
|
||||
context: "!only-office"
|
||||
context: "!only-prod-schema"
|
||||
- include:
|
||||
file: db/changelog/6-hs-booking/630-booking-item/6303-hs-booking-item-rbac.sql
|
||||
context: "!only-office"
|
||||
context: "!only-prod-schema"
|
||||
- include:
|
||||
file: db/changelog/6-hs-booking/630-booking-item/6308-hs-booking-item-test-data.sql
|
||||
context: "!only-office and !without-test-data"
|
||||
context: "!only-prod-schema and !without-test-data"
|
||||
|
||||
- include:
|
||||
file: db/changelog/7-hs-hosting/700-hs-hosting-schema.sql
|
||||
context: "!only-office"
|
||||
context: "!only-prod-schema"
|
||||
- include:
|
||||
file: db/changelog/7-hs-hosting/701-hosting-asset/7010-hs-hosting-asset.sql
|
||||
context: "!only-office"
|
||||
context: "!only-prod-schema"
|
||||
- include:
|
||||
file: db/changelog/7-hs-hosting/701-hosting-asset/7013-hs-hosting-asset-rbac.sql
|
||||
context: "!only-office"
|
||||
context: "!only-prod-schema"
|
||||
- include:
|
||||
file: db/changelog/7-hs-hosting/701-hosting-asset/7016-hs-hosting-asset-migration.sql
|
||||
context: "!only-office"
|
||||
context: "!only-prod-schema"
|
||||
- include:
|
||||
file: db/changelog/7-hs-hosting/701-hosting-asset/7018-hs-hosting-asset-test-data.sql
|
||||
context: "!only-office and !without-test-data"
|
||||
context: "!only-prod-schema and !without-test-data"
|
||||
|
||||
- include:
|
||||
file: db/changelog/9-hs-global/9000-statistics.sql
|
||||
context: "!only-office"
|
||||
context: "!only-prod-schema"
|
||||
|
||||
- include:
|
||||
file: db/changelog/9-hs-global/950-credentials/9500-hs-credentials-schema.sql
|
||||
context: "!only-prod-schema"
|
||||
- include:
|
||||
file: db/changelog/9-hs-global/950-credentials/9510-hs-credentials.sql
|
||||
context: "!only-prod-schema"
|
||||
# TODO_impl: RBAC rules for _rv do not yet work properly
|
||||
# - include:
|
||||
# file: db/changelog/9-hs-global/950-credentials/9513-hs-credentials-rbac.sql
|
||||
- include:
|
||||
file: db/changelog/9-hs-global/950-credentials/9519-hs-credentials-test-data.sql
|
||||
context: "!without-test-data"
|
||||
context: "!only-prod-schema and !without-test-data"
|
||||
|
||||
- include:
|
||||
file: db/changelog/9-hs-global/960-integrations/9600-hs-integration-schema.sql
|
||||
|
||||
Reference in New Issue
Block a user