Skip to content

Commit

Permalink
Add a more realistic test user
Browse files Browse the repository at this point in the history
  • Loading branch information
Gekkio committed Dec 16, 2024
1 parent 7d5f59c commit e6be70b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apigw/src/internal/dev-sfi-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function createDevEmployeeSfiRouter(
sessions,
root: '/employee',
loginFormHandler: async (req, res) => {
const defaultSsn = '070644-937X'
const defaultSsn = '060195-966B'

const persons = _.orderBy(
await getVtjPersons(),
Expand Down
5 changes: 4 additions & 1 deletion service/src/main/resources/dev-data/employees.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ INSERT INTO employee (id, first_name, last_name, email, external_id, active) VAL
('00000000-0000-0000-0005-000000000000', 'Kaisa', 'Kasvattaja', '[email protected]', 'espoo-ad:00000000-0000-0000-0005-000000000000', TRUE),
('00000000-0000-0000-0005-000000000001', 'Kalle', 'Kasvattaja', '[email protected]', 'espoo-ad:00000000-0000-0000-0005-000000000001', TRUE),
('00000000-0000-0000-0006-000000000000', 'Erkki', 'Erityisopettaja', '[email protected]', 'espoo-ad:00000000-0000-0000-0006-000000000000', TRUE);
INSERT INTO employee (id, first_name, last_name, social_security_number, active) VALUES
('fdbf9276-c5a9-4092-87f8-6a27521d940a', 'Hannele', 'Finström', '060195-966B', true);

INSERT INTO evaka_user (id, type, employee_id, name)
SELECT id, 'EMPLOYEE', id, last_name || ' ' || first_name
Expand All @@ -27,7 +29,8 @@ INSERT INTO daycare_acl (daycare_id, employee_id, role) VALUES
('2dcf0fc0-788e-11e9-bd12-db78e886e666', '00000000-0000-0000-0006-000000000000', 'SPECIAL_EDUCATION_TEACHER'),
('2dd6e5f6-788e-11e9-bd72-9f1cfe2d8405', '00000000-0000-0000-0004-000000000001', 'UNIT_SUPERVISOR'),
('2dd6e5f6-788e-11e9-bd72-9f1cfe2d8405', '00000000-0000-0000-0005-000000000001', 'STAFF'),
('2dd6e5f6-788e-11e9-bd72-9f1cfe2d8405', '00000000-0000-0000-0006-000000000000', 'SPECIAL_EDUCATION_TEACHER');
('2dd6e5f6-788e-11e9-bd72-9f1cfe2d8405', '00000000-0000-0000-0006-000000000000', 'SPECIAL_EDUCATION_TEACHER'),
('2dd6e5f6-788e-11e9-bd72-9f1cfe999999', 'fdbf9276-c5a9-4092-87f8-6a27521d940a', 'UNIT_SUPERVISOR');

INSERT INTO message_account (employee_id, type)
SELECT id, 'PERSONAL'::message_account_type AS type
Expand Down

0 comments on commit e6be70b

Please sign in to comment.