Access Control Logic : Belajarbina.online
Access Control Logic
Implemented a strict eligibility gate that grants LMS access only when the buyer’s WooCommerce order status is Completed, then routes users into the correct environment (Basic or Higher Tier) to keep access behavior predictable under caching.
Gate Condition
Order = Completed (no completed order = no access)
Routing Rule
Tier purchased → route to
base or lms environment
Design Priority
Reduce conditional logic, avoid cache edge-cases, minimize manual admin work
1) Access Risks Identified
What can go wrong if access rules are too conditional inside one LMS instance.
- Without a hard gate, users can hit inconsistent access states across sessions
- Conditional restrictions (time/module/tier) inside one instance increase edge-case risk
- Caching can cause users to see wrong access views if logic depends on runtime conditions
- Manual admin overrides become frequent when rules are not structurally simplified
2) Rule Design
A simple rule-set that stays stable as the system grows.
Eligibility Gate
- Purchase recorded via WooCommerce
- Access eligible only when Order = Completed
- Anything else (Pending/Failed/On-hold) = blocked
Tier Routing
- Basic tier →
base.belajarbina.online - Higher tier →
lms.belajarbina.online - Tier separation reduces runtime conditional rendering
Fail-Safe Behavior
- Default stance: deny access unless clearly eligible
- Clear error states: “Not completed / no access yet”
- Prevents accidental grants due to cache or stale sessions
3) End-to-End Flow
From purchase → eligibility check → environment routing.
Outcome (Qualitative)
The outcome is reliability: fewer edge cases and less admin intervention.
- Predictable eligibility: order status cleanly controls access
- Stable routing: tiers land in the correct environment consistently
- Lower operational load: fewer manual fixes caused by conditional access conflicts
Resulting system behavior
A deny-by-default access model with clear routing rules — built for stability, not fragile conditional logic.