Compare commits

..

No commits in common. "b5f5d80057826ca52d88f8407b607140d209ff9c" and "9b17c13f44cfffe96cb48fa130df4bf9ff8f2d03" have entirely different histories.

2 changed files with 48 additions and 35 deletions

View File

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