Skip to content

[3.0] Bots - reduce permissions queries#9149

Merged
jdarwood007 merged 1 commit intoSimpleMachines:release-3.0from
sbulen:30_bot_guest_mod
Mar 14, 2026
Merged

[3.0] Bots - reduce permissions queries#9149
jdarwood007 merged 1 commit intoSimpleMachines:release-3.0from
sbulen:30_bot_guest_mod

Conversation

@sbulen
Copy link
Contributor

@sbulen sbulen commented Mar 13, 2026

3.0 version of #9124 - More discussion may be found there.

This PR aims to minimize unnecessary I/O by not doing moderator permissions lookups for guests and bots, who we already know will not have any moderator or admin privileges... This can add a lot of unnecessary permissions queries during normal operation, but especially during bot attacks.

I've been running this code on my prod forum with no issues.

For more discussion see:
https://www.simplemachines.org/community/index.php?topic=592442.0

NOTE I cannot test this due to #9146 , but it looks simple enough...

NOTE2 I cannot run php fixer due to errors, e.g.,

The rules contain risky fixers ("native_function_invocation"), but they are not allowed to run. Perhaps you forget to use --allow-risky=yes option?

I hope I did the new syntax correctly.

Feedback welcome.

Signed-off-by: Shawn Bulen <bulens@pacbell.net>
@jdarwood007 jdarwood007 added this to the 3.0 Alpha 5 milestone Mar 14, 2026
@jdarwood007 jdarwood007 merged commit ebcc562 into SimpleMachines:release-3.0 Mar 14, 2026
8 checks passed
@sbulen sbulen deleted the 30_bot_guest_mod branch March 15, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants