stargate-rewritten / Stargate-Bukkit

The original, and still the best, survival-friendly portal plugin.
https://sgrewritten.org/paper
GNU Lesser General Public License v3.0
33 stars 12 forks source link

P flag behaviour #360

Closed Pheotis closed 5 months ago

Pheotis commented 5 months ago

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. ❌

Trace Logs

No response

Other Information

Latest core, modules, and paper.

Thorinwasher commented 5 months ago

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:

The protection is also not there for fixed gates

Otherwise for networked gates, the P gate will be hidden

EpicKnarvik97 commented 5 months ago

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.

Thorinwasher commented 5 months ago

those permission checks should be checked upon entry into the portal, not during activation

that's a valid solution, should we go with that?