Compare commits

...

5 Commits

Author SHA1 Message Date
b5f5d80057 login type fix 2026-02-27 06:38:07 -08:00
3a15a65ddb Merge remote-tracking branch 'origin/production' 2026-02-27 01:49:07 -08:00
Kerod-Fresenbet-Gebremedhin2660
7587cf9785 Empty commit to trigger CI/CD - 3 2026-02-24 19:53:52 +03:00
Kerod-Fresenbet-Gebremedhin2660
0b2a0b02c7 Empty commit to trigger CI/CD - 2 2026-02-24 19:50:41 +03:00
Kerod-Fresenbet-Gebremedhin2660
34af23a7fd Empty commit to trigger CI/CD - 1 2026-02-24 19:46:31 +03:00
2 changed files with 35 additions and 48 deletions

View File

@ -1,6 +1,10 @@
CREATE EXTENSION IF NOT EXISTS pgcrypto; CREATE EXTENSION IF NOT EXISTS pgcrypto;
-- ======================================================
-- Customer/Learner Users (login via /api/v1/auth/customer-login)
-- Credentials: email + password@123
-- ======================================================
INSERT INTO users ( INSERT INTO users (
id, id,
first_name, first_name,
@ -40,9 +44,9 @@ VALUES
'Student', 'Student',
'Male', 'Male',
'2000-01-01', '2000-01-01',
'student10@yimaru.com', 'student@yimaru.com',
NULL, NULL,
'USER', 'STUDENT',
crypt('password@123', gen_salt('bf'))::bytea, crypt('password@123', gen_salt('bf'))::bytea,
'25_34', '25_34',
'Bachelor', 'Bachelor',
@ -68,25 +72,25 @@ VALUES
), ),
( (
11, 11,
'System', 'Abebe',
'Admin', 'Kebede',
'Female', 'Male',
'1995-01-01', '1995-01-01',
'admin@yimaru.com', 'abebe@yimaru.com',
'0911001100', '0911001100',
'ADMIN', 'STUDENT',
crypt('password@123', gen_salt('bf'))::bytea, crypt('password@123', gen_salt('bf'))::bytea,
'35_44', '35_44',
'Master', 'Master',
'Ethiopia', 'Ethiopia',
'Addis Ababa', 'Addis Ababa',
'ADVANCED', 'INTERMEDIATE',
'SysAdmin', 'Abebe',
'Administrator', 'Teacher',
'Manage system', 'Improve English',
'English', 'English',
'Writing', 'Writing',
'Management', 'Education',
TRUE, TRUE,
TRUE, TRUE,
TRUE, TRUE,
@ -100,25 +104,25 @@ VALUES
), ),
( (
12, 12,
'Support', 'Sara',
'Agent', 'Tadesse',
'Female', 'Female',
'1998-01-01', '1998-01-01',
'support@yimaru.com', 'sara@yimaru.com',
'0911223344', '0911223344',
'SUPPORT', 'STUDENT',
crypt('password@123', gen_salt('bf'))::bytea, crypt('password@123', gen_salt('bf'))::bytea,
'55_PLUS', '55_PLUS',
'Diploma', 'Diploma',
'Ethiopia', 'Ethiopia',
'Addis Ababa', 'Addis Ababa',
'INTERMEDIATE', 'BEGINNER',
'Support', 'Sara',
'Agent', 'Nurse',
'Assist users', 'Learn conversational English',
'English', 'English',
'Conversation', 'Conversation',
'Customer Service', 'Healthcare',
TRUE, TRUE,
TRUE, TRUE,
TRUE, TRUE,
@ -412,7 +416,8 @@ VALUES
ON CONFLICT (question_set_id, user_id) DO NOTHING; ON CONFLICT (question_set_id, user_id) DO NOTHING;
-- ====================================================== -- ======================================================
-- Team Members (Internal LMS Staff) -- Team Members / Admin Panel Users (login via /api/v1/team/login)
-- Credentials: email + password@123
-- ====================================================== -- ======================================================
INSERT INTO team_members ( INSERT INTO team_members (
@ -434,24 +439,6 @@ INSERT INTO team_members (
created_at created_at
) )
VALUES VALUES
(
1,
'Yared',
'Yemane',
'yared@yimaru.com',
'0911001100',
crypt('password@123', gen_salt('bf'))::bytea,
'SUPER_ADMIN',
'Engineering',
'CTO',
'full_time',
'2024-01-01',
'Platform super administrator with full system access.',
'active',
TRUE,
'["*"]'::jsonb,
CURRENT_TIMESTAMP
),
( (
2, 2,
'Admin', 'Admin',

View File

@ -17,14 +17,14 @@ var (
type TeamRole string type TeamRole string
const ( const (
TeamRoleSuperAdmin TeamRole = "super_admin" TeamRoleSuperAdmin TeamRole = "SUPER_ADMIN"
TeamRoleAdmin TeamRole = "admin" TeamRoleAdmin TeamRole = "ADMIN"
TeamRoleContentManager TeamRole = "content_manager" TeamRoleContentManager TeamRole = "CONTENT_MANAGER"
TeamRoleSupportAgent TeamRole = "support_agent" TeamRoleSupportAgent TeamRole = "SUPPORT_AGENT"
TeamRoleInstructor TeamRole = "instructor" TeamRoleInstructor TeamRole = "INSTRUCTOR"
TeamRoleFinance TeamRole = "finance" TeamRoleFinance TeamRole = "FINANCE"
TeamRoleHR TeamRole = "hr" TeamRoleHR TeamRole = "HR"
TeamRoleAnalyst TeamRole = "analyst" TeamRoleAnalyst TeamRole = "ANALYST"
) )
func (r TeamRole) IsValid() bool { func (r TeamRole) IsValid() bool {