SMF icon indicating copy to clipboard operation
SMF copied to clipboard

Add permission for using Gravatars

Open BrickOzp opened this issue 2 years ago • 6 comments

Add a separate group permission for using Gravatars.

Fixes #7635

Signed-off-by: Oscar Rydhé [email protected]

BrickOzp avatar Dec 02 '22 13:12 BrickOzp

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.

BrickOzp avatar Dec 02 '22 13:12 BrickOzp

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.

Oldiesmann avatar Dec 26 '22 03:12 Oldiesmann

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.

jdarwood007 avatar Mar 12 '23 22:03 jdarwood007

Is the upgrader run for minor releases?

BrickOzp avatar Mar 16 '23 06:03 BrickOzp

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: @.***>

live627 avatar Mar 16 '23 07:03 live627

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.

jdarwood007 avatar Mar 16 '23 22:03 jdarwood007

I will add code to the patch to clone the existing profile_remote_avatar permission to profile_gravatar.

Sesquipedalian avatar May 10 '24 22:05 Sesquipedalian