Skip to main content

AccessPolicyRealm

Which realm a policy's consequence runs in.

Policies are registered in both realms regardless, so a console on either side knows every policy name and can autocomplete it. The realm decides only where apply actually runs -- kicking is server-side, showing a piece of UI is client-side, and neither should half-happen on the wrong one.

Functions

runsHere

AccessPolicyRealm.runsHere(
realmstring,
isServerboolean
) → boolean

Whether a policy declaring this realm should run where we are.

Show raw api
{
    "functions": [
        {
            "name": "runsHere",
            "desc": "Whether a policy declaring this realm should run where we are.",
            "params": [
                {
                    "name": "realm",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "isServer",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 42,
                "path": "src/access/src/Shared/AccessPolicyRealm.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "AccessPolicyRealm",
    "desc": "Which realm a policy's consequence runs in.\n\nPolicies are registered in **both** realms regardless, so a console on either side knows every policy\nname and can autocomplete it. The realm decides only where `apply` actually runs -- kicking is\nserver-side, showing a piece of UI is client-side, and neither should half-happen on the wrong one.",
    "source": {
        "line": 11,
        "path": "src/access/src/Shared/AccessPolicyRealm.lua"
    }
}