AccessPlayer
The server half of AccessPlayerBase. Adds the things only a server may do: forcing a fact, and saying whether a policy is actually running against this player.
Bound to every player automatically -- reach it with AccessPlayerInterface:Find(player) rather than
by requiring this module, so consumers do not depend on the package.
Functions
PromiseClientAccessState
Asks this player's client what it thinks their access is.
For a console readout only. The answer is never used to decide anything -- a client that could report its own access authoritatively could grant itself whatever it liked. Its worth is that a person can see both realms at once, and a disagreement is exactly the bug this package exists to make visible.
Rejects if the client does not answer, which is itself informative: it means their realm never got far enough to have a view.
SetFactOverride
AccessPlayer.SetFactOverride() → () → ()--
Clears this override
Forces a fact for this player, whatever its layers say. Pass nil to force unresolved.
ClearFactOverride
ClearFactOverrides
IsPolicyActive
Whether a policy is active for this player: enabled, in this realm, and tracking them.
No ForPlayer suffix here, unlike AccessPolicyService and [AccessPolicy]: this object is a player,
so the suffix would name something already in the receiver. The rule is that a method says ForPlayer
exactly when it takes one.