Problems

Permission Gate

MediumConditional Rendering

A <Gate requires={...}> renders children only when the user has every required permission. Input: line 1 — user permissions JSON array; line 2 — required permissions JSON array; line 3 — the children text. Print the children if allowed, else 403.

Input: three lines. Output: children or 403.

Your program reads from stdin and prints to stdout.

Example 1

Input: ["read","write"] ["read"] Secret panel

Output: Secret panel

Hints

ReactConditionalAuth
Permission Gate | CodeForge AI