P flag behaviour
Pheotis opened this issue · 3 comments
Bug Description
P flag appears to only partially be working.
Reproduction Steps
N/A
Desired Behaviour
If a portal has a p
flag
a. Users without nodes to create portals on the P gate's network should not be able to use the portal.
b. Those same users should be unable to travel to the P gate in question from another portal on the same network.
Observed Behaviour
If a portal has a p
flag:
a. Users without nodes to create the portal should not be able to use the portal. ✔️
b. Those same users should be unable to travel to the P gate in question from another portal on the same network. ❌
- If the trip originated from an S
gate, this P
gate restriction should be ignored?
Trace Logs
No response
Other Information
Latest core, modules, and paper.
those permission checks should be checked upon entry into the portal, not during activation
that's a valid solution, should we go with that?
I can confirm this protection being latent whenever the source gate is an always on gate. The problem here is that the user that activated the always on gate does:
- Not necessarily need to be online at the moment of the permission check, the destination can be persistent across restarts.
- Not necessarily need to be the user that is entering the gate
The protection is also not there for fixed gates
Otherwise for networked gates, the P
gate will be hidden
I can confirm this protection being latent whenever the source gate is an always on gate. The problem here is that the user that activated the always on gate does:
I'm not sure why the person activating an always on or fixed gate is relevant. In most cases, there isn't an activator, unless it's the player that created the Stargate in the first place. For fixed and always on portals, those permission checks should be checked upon entry into the portal, not during activation. I do realize that it kind of breaks the ability to piggyback onto a player with the proper permission, which I'm not sure what can be done about.