authorization

Resolve access control misconfigurations for OrangeHRM REST endpoints and Vue pages.

1.1k|746|Updated Jan 5, 2017
One-click install
npx skills add https://github.com/orangehrm/orangehrm --skill authorization-orangehrm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: authorization
Source: https://github.com/orangehrm/orangehrm/tree/main/.agents/skills/authorization
Command: npx skills add https://github.com/orangehrm/orangehrm --skill authorization-orangehrm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the frustration of unexpected 403 errors, misconfigured public routes, and missing permission seeds when building or modifying OrangeHRM features, ensuring access controls work as intended for both REST APIs and Vue pages.

Core Features & Use Cases

  • Full Authorization Model Coverage: Documents the shared three-gate authentication and authorization flow, role-based permission merging, and the PublicControllerInterface marker for public routes.
  • REST & Page-Specific Guidance: Includes step-by-step recipes for adding authenticated/public REST endpoints, authenticated/public Vue pages, and runtime-gated conditional pages using CapableViewController.
  • Debugging & Migration Support: Provides structured troubleshooting steps for 403 and unauthorized errors, plus minimal migration stubs for seeding permission changes without full reinstall.

Quick Start

Use the authorization skill to resolve a 403 error when accessing the employee list page by verifying the user's effective roles, screen permission entries, and CapableViewController implementation status.

Frequently Asked Questions about authorization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why do I get a 403 Unauthorized error when accessing my OrangeHRM Vue page or REST endpoint?

A 403 Unauthorized error in OrangeHRM usually means missing role-based permission seeds or misconfigured access control rules for your Vue page controllers or REST endpoints. You must verify the user's effective roles, screen permission entries, and controller implementation status.

How do I add a public REST API route in OrangeHRM without authentication blocking?

To add a public REST API route in OrangeHRM, you must implement the PublicControllerInterface marker interface for your controller. This bypasses the standard authentication gate and correctly configures access control rules for unauthenticated access.

How does role-based permission merging work for OrangeHRM access control?

OrangeHRM uses a three-gate authentication and authorization flow that merges role-based permissions across assigned roles. This determines effective access to screens, data groups, and REST endpoints before runtime capability checks are applied.

How do I set up conditional page access using runtime capability checks in OrangeHRM?

To set up conditional page access in OrangeHRM, implement the CapableViewController interface for your Vue page. This applies runtime capability checks to gate visibility and access based on the user's effective merged permissions.

How do I seed new screen permissions in OrangeHRM without running a full system reinstall?

You can seed new screen and data group permissions in OrangeHRM without a full reinstall by applying minimal migration stubs. This targets the role-based permission entries directly, ensuring access control rules recognize the new screens immediately.

What is the best way to debug Session Expired responses on authenticated OrangeHRM API routes?

Debugging Session Expired responses on OrangeHRM API routes involves tracing the three-gate authentication flow to verify session validity and token handling. You must check if the route is correctly marked as authenticated and ensure no public route misconfiguration is breaking the session.