Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "user": {
- "id": "3d58f4b2-7f72-4c25-9b3b-2b0c3b3c1a01",
- ...
- },
- "roles": [
- {
- "assignment": {
- "id": "3f21a6b1-02ce-48bf-91c0-4a0c1d77a901",
- "companyHqId": "hq-1",
- "companyRole": "owner_hq",
- ...
- },
- "permissions": [
- {
- "permission": "perm:dashboard.view",
- "level": "hq",
- "description": "View dashboard at HQ scope"
- },
- {
- "permission": "perm:profile_completion:business_profile:view",
- "level": "hq",
- "description": "View Business Profile (HQ)"
- },
- {
- "permission": "perm:profile_completion:business_profile:edit",
- "level": "hq",
- "description": "Edit Business Profile (HQ)"
- },
- {
- "permission": "perm:profile_completion:comp_rep:view",
- "level": "hq",
- "description": "View Company Representative (HQ)"
- },
- {
- "permission": "perm:profile_completion:comp_rep:edit",
- "level": "hq",
- "description": "Edit Company Representative (HQ)"
- },
- {
- "permission": "perm:profile_completion:hq_branch_info:view",
- "level": "hq",
- "description": "View HQ & Branch Info (HQ)"
- },
- {
- "permission": "perm:profile_completion:hq_branch_info:edit",
- "level": "hq",
- "description": "Edit HQ & Branch Info (HQ)"
- },
- { "permission": "perm:hq:register", "level": "hq", "description": "Register HQ" },
- { "permission": "perm:hq:edit", "level": "hq", "description": "Edit HQ" },
- {
- "permission": "perm:branch:register",
- "level": "hq",
- "branch_scope": "all",
- "description": "Register branch under this HQ"
- },
- {
- "permission": "perm:branch:edit",
- "level": "hq",
- "branch_scope": "all",
- "description": "Edit any branch under this HQ"
- },
- {
- "permission": "perm:team:register",
- "level": "hq",
- "branch_scope": "all",
- "dept_scope": "all",
- "description": "Register team members across all branches and departments"
- },
- {
- "permission": "perm:team:edit",
- "level": "hq",
- "branch_scope": "all",
- "dept_scope": "all",
- "description": "Edit team members across all branches and departments"
- },
- {
- "permission": "perm:job:create:details",
- "level": "hq",
- "branch_scope": "all",
- "dept_scope": "all",
- "description": "Create Job - Job Details (all branches, all departments)"
- },
- {
- "permission": "perm:job:create:workflow",
- "level": "hq",
- "branch_scope": "all",
- "dept_scope": "all",
- "description": "Create Job - Recruitment Workflow (all/all)"
- },
- {
- "permission": "perm:job:create:publish",
- "level": "hq",
- "branch_scope": "all",
- "dept_scope": "all",
- "description": "Create Job - Review & Publish (all/all)"
- },
- {
- "permission": "perm:job:draft:edit",
- "level": "hq",
- "branch_scope": "all",
- "dept_scope": "all",
- "description": "Edit Job Draft (all/all)"
- },
- {
- "permission": "perm:job:close",
- "level": "hq",
- "branch_scope": "all",
- "dept_scope": "all",
- "description": "Close Job (all/all)"
- },
- {
- "permission": "perm:applicant:view",
- "level": "hq",
- "branch_scope": "all",
- "dept_scope": "all",
- "description": "View Applicants (all/all)"
- },
- {
- "permission": "perm:applicant:decision",
- "level": "hq",
- "branch_scope": "all",
- "dept_scope": "all",
- "description": "Approve/Reject Applicants (all/all)"
- },
- {
- "permission": "perm:applicant:move",
- "level": "hq",
- "branch_scope": "all",
- "dept_scope": "all",
- "description": "Move Applicants across stages (all/all)"
- },
- { "permission": "perm:ownership:transfer", "level": "hq", "description": "Transfer Company Ownership" },
- // General jobs features accessible to all roles (self/public context)
- { "permission": "perm:jobs:list:view", "level": "public", "description": "View job list" },
- { "permission": "perm:jobs:details:view", "level": "public", "description": "View job details" },
- { "permission": "perm:jobs:apply:external","level": "self", "description": "Apply external jobs" },
- { "permission": "perm:jobs:apply:internal","level": "self", "description": "Apply internal jobs (if enabled)" },
- { "permission": "perm:jobs:apply:freelance","level": "self", "description": "Apply freelance jobs (if enabled)" },
- { "permission": "perm:jobs:saved:view", "level": "self", "description": "View saved jobs" },
- { "permission": "perm:jobs:applied:view", "level": "self", "description": "View applied jobs" },
- // Edit self profile (owner: tidak boleh edit role, tapi boleh personal/branch/dept)
- { "permission": "perm:self_profile:personal:edit", "level": "self", "description": "Edit own personal details" },
- { "permission": "perm:self_profile:branch_assignment:edit","level": "self", "description": "Edit own branch assignment" },
- { "permission": "perm:self_profile:dept_assignment:edit", "level": "self", "description": "Edit own department assignment" }
- ]
- },
- {
- "assignment": {
- "id": "a1d2c3e4-f5a6-47b8-9c0d-e1f2a3b4c5d6",
- "companyHqId": "hq-1",
- "companyRole": "hrd_branch",
- ...
- },
- "permissions": [
- {
- "permission": "perm:dashboard.view",
- "level": "branch",
- "description": "View dashboard at Branch scope"
- },
- {
- "permission": "perm:profile_completion:hq_branch_info:view",
- "level": "branch",
- "description": "View Branch Info (self branch)"
- },
- {
- "permission": "perm:profile_completion:hq_branch_info:edit",
- "level": "branch",
- "description": "Edit Branch Info (self branch)"
- },
- {
- "permission": "perm:branch:edit",
- "level": "branch",
- "branch_scope": "self",
- "description": "Edit own branch"
- },
- {
- "permission": "perm:team:register",
- "level": "branch",
- "branch_scope": "self",
- "dept_scope": "all",
- "description": "Register team on self branch (all depts)"
- },
- {
- "permission": "perm:team:edit",
- "level": "branch",
- "branch_scope": "self",
- "dept_scope": "all",
- "description": "Edit team on self branch (all depts)"
- },
- {
- "permission": "perm:job:create:details",
- "level": "branch",
- "branch_scope": "self",
- "dept_scope": "all",
- "description": "Create Job - Job Details (all depts on self branch)"
- },
- {
- "permission": "perm:job:create:workflow",
- "level": "branch",
- "branch_scope": "self",
- "dept_scope": "all",
- "description": "Create Job - Workflow (all depts on self branch)"
- },
- {
- "permission": "perm:job:create:publish",
- "level": "branch",
- "branch_scope": "self",
- "dept_scope": "all",
- "description": "Create Job - Publish (all depts on self branch)"
- },
- {
- "permission": "perm:job:draft:edit",
- "level": "branch",
- "branch_scope": "self",
- "dept_scope": "all",
- "description": "Edit Job Draft (all depts on self branch)"
- },
- {
- "permission": "perm:job:close",
- "level": "branch",
- "branch_scope": "self",
- "dept_scope": "all",
- "description": "Close Job (all depts on self branch)"
- },
- {
- "permission": "perm:applicant:view",
- "level": "branch",
- "branch_scope": "self",
- "dept_scope": "all",
- "description": "View Applicants (all depts on self branch)"
- },
- {
- "permission": "perm:applicant:decision",
- "level": "branch",
- "branch_scope": "self",
- "dept_scope": "all",
- "description": "Approve/Reject Applicants (all depts on self branch)"
- },
- {
- "permission": "perm:applicant:move",
- "level": "branch",
- "branch_scope": "self",
- "dept_scope": "all",
- "description": "Move Applicants across stages (all depts on self branch)"
- },
- // General jobs features (self/public)
- { "permission": "perm:jobs:list:view", "level": "public", "description": "View job list" },
- { "permission": "perm:jobs:details:view", "level": "public", "description": "View job details" },
- { "permission": "perm:jobs:apply:external","level": "self", "description": "Apply external jobs" },
- { "permission": "perm:jobs:apply:internal","level": "self", "description": "Apply internal jobs (if enabled)" },
- { "permission": "perm:jobs:apply:freelance","level": "self", "description": "Apply freelance jobs (if enabled)" },
- { "permission": "perm:jobs:saved:view", "level": "self", "description": "View saved jobs" },
- { "permission": "perm:jobs:applied:view", "level": "self", "description": "View applied jobs" },
- // Edit self profile (HRD branch boleh edit role/branch/dept dirinya sendiri sesuai policy-mu)
- { "permission": "perm:self_profile:personal:edit", "level": "self", "description": "Edit own personal details" },
- { "permission": "perm:self_profile:role:edit", "level": "self", "description": "Edit own company role" },
- { "permission": "perm:self_profile:branch_assignment:edit","level": "self", "description": "Edit own branch assignment" },
- { "permission": "perm:self_profile:dept_assignment:edit", "level": "self", "description": "Edit own department assignment" }
- ]
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment