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;
-- ======================================================
-- Customer/Learner Users (login via /api/v1/auth/customer-login)
-- Credentials: email + password@123
-- ======================================================
INSERT INTO users (
id,
first_name,
@ -40,9 +44,9 @@ VALUES
'Student',
'Male',
'2000-01-01',
'student10@yimaru.com',
'student@yimaru.com',
NULL,
'USER',
'STUDENT',
crypt('password@123', gen_salt('bf'))::bytea,
'25_34',
'Bachelor',
@ -68,25 +72,25 @@ VALUES
),
(
11,
'System',
'Admin',
'Female',
'Abebe',
'Kebede',
'Male',
'1995-01-01',
'admin@yimaru.com',
'abebe@yimaru.com',
'0911001100',
'ADMIN',
'STUDENT',
crypt('password@123', gen_salt('bf'))::bytea,
'35_44',
'Master',
'Ethiopia',
'Addis Ababa',
'ADVANCED',
'SysAdmin',
'Administrator',
'Manage system',
'INTERMEDIATE',
'Abebe',
'Teacher',
'Improve English',
'English',
'Writing',
'Management',
'Education',
TRUE,
TRUE,
TRUE,
@ -100,25 +104,25 @@ VALUES
),
(
12,
'Support',
'Agent',
'Sara',
'Tadesse',
'Female',
'1998-01-01',
'support@yimaru.com',
'sara@yimaru.com',
'0911223344',
'SUPPORT',
'STUDENT',
crypt('password@123', gen_salt('bf'))::bytea,
'55_PLUS',
'Diploma',
'Ethiopia',
'Addis Ababa',
'INTERMEDIATE',
'Support',
'Agent',
'Assist users',
'BEGINNER',
'Sara',
'Nurse',
'Learn conversational English',
'English',
'Conversation',
'Customer Service',
'Healthcare',
TRUE,
TRUE,
TRUE,
@ -412,7 +416,8 @@ VALUES
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 (
@ -434,24 +439,6 @@ INSERT INTO team_members (
created_at
)
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,
'Admin',

View File

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