SMF
SMF copied to clipboard
Add permission for using Gravatars
Add a separate group permission for using Gravatars.
Fixes #7635
Signed-off-by: Oscar Rydhé [email protected]
A drawback with this solution is that all forums that uses Gravatar need to set this permission for all groups that should be able to use Gravatars after the upgrade.
Since the current default behavior in SMF is to allow Gravatars even when other avatar options aren't allowed, the solution to that could just be to set that permission by default (or at least try to - may not always be possible depending on how complicated the setup is), and tell people they can remove the permission if they don't want it.
I wouldn't approve of this for release until we handle the permission issue. As we are adding a new permission mid release, I feel we need to address what the expected "default" would be. I would go off of the permission to choose a remotely stored avatar and clone that. But only if we have detected no existing permissions exists for gravatars.
@BrickOzp Do you think you could make something like that happen or should we delay this for a future release? If you can make it for this release, send up the PR and move the milestone.
Is the upgrader run for minor releases?
2.1.x -> 2.1.x + 1? No; patches are run from the package manager.
On Wed, Mar 15, 2023 at 11:49 PM BrickOzp @.***> wrote:
Is the upgrader run for minor releases?
— Reply to this email directly, view it on GitHub https://github.com/SimpleMachines/SMF/pull/7638#issuecomment-1471409773, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADJNN43SGYKLXOGPGL565LW4KZWPANCNFSM6AAAAAASR6ACUQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Well we can execute a script during install.
The issue will be functionality will appear to break or not work due to this upgrade that previously worked. A quick scetch of the code that I think would work
If (count of select * from permissions where permission = 'gravatar') == 0)
insert into permissions select permission = 'gravatar, * from permissions where permission = 'remotely stored avatar'
Shouldn't hurt to run this as its permissions on a general level and not board level.
I will add code to the patch to clone the existing profile_remote_avatar permission to profile_gravatar.