Skip to content

[2.1] Bots - reduce permissions queries#9124

Merged
jdarwood007 merged 2 commits intoSimpleMachines:release-2.1from
sbulen:21_bot_guest_mod
Mar 14, 2026
Merged

[2.1] Bots - reduce permissions queries#9124
jdarwood007 merged 2 commits intoSimpleMachines:release-2.1from
sbulen:21_bot_guest_mod

Conversation

@sbulen
Copy link
Contributor

@sbulen sbulen commented Feb 25, 2026

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.

If this is approved, I can submit a 3.0 version.

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

Feedback welcome.

Signed-off-by: Shawn Bulen <bulens@pacbell.net>
@jdarwood007 jdarwood007 added this to the 2.1.8 milestone Mar 8, 2026
@jdarwood007
Copy link
Member

@sbulen Do you have the related updates for 3.0 on this PR?

@sbulen
Copy link
Contributor Author

sbulen commented Mar 8, 2026

I was going to add 3.0 versions once the 2.1 ones were approved. Trying to avoid duplication of rework, etc.

Some of these are a little higher risk than others.

This one, I think, is a no-brainer. Pretty substantial reduction in queries, no loss of functionality.

@jdarwood007
Copy link
Member

I've tagged this on the 3.0 project with the 2.1.8 milestone. Will test later.

Signed-off-by: Shawn Bulen <bulens@pacbell.net>
@sbulen
Copy link
Contributor Author

sbulen commented Mar 12, 2026

Requested changes made.

Copy link
Member

@jdarwood007 jdarwood007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, will wait for a 3.0 version before I merge.

@jdarwood007 jdarwood007 merged commit cbe74ca into SimpleMachines:release-2.1 Mar 14, 2026
10 checks passed
@sbulen sbulen deleted the 21_bot_guest_mod branch March 15, 2026 16:59
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.

3 participants