Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP Parse.ly: Fix issue with support user bypass #5965

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

vaurdan
Copy link
Member

@vaurdan vaurdan commented Oct 30, 2024

Description

This PR is a follow up of #5765. Using user_can to check for support users will return true, even if the user is a regular super admin. This is not the desired behaviour, as a certain Parse.ly Content Helper feature might be disabled on the site, which should still be visible to support users, but not regular super admins.

This PR changes how it is detecting a support user, and uses the user_has_vip_support_role method instead.

Changelog Description

Fixed

  • WP Parse.ly: Fixed how Support Users are detected in the Parse.ly plugin.

Pre-review checklist

Please make sure the items below have been covered before requesting a review:

  • This change works and has been tested locally or in Codespaces (or has an appropriate fallback).
  • This change works and has been tested on a sandbox.
  • This change has relevant unit tests (if applicable).
  • This change uses a rollout method to ease with deployment (if applicable - especially for large scale actions that require writes).
  • This change has relevant documentation additions / updates (if applicable).
  • I've created a changelog description that aligns with the provided examples.

Pre-deploy checklist

  • VIP staff: Ensure any alerts added/updated conform to internal standards (see internal documentation).

Steps to Test

Same as #5765.

@vaurdan vaurdan requested a review from a team as a code owner October 30, 2024 13:51
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 30.43%. Comparing base (87ffe8c) to head (f300b4f).

Files with missing lines Patch % Lines
vip-parsely/vip-parsely.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #5965      +/-   ##
=============================================
+ Coverage      30.36%   30.43%   +0.06%     
  Complexity      4812     4812              
=============================================
  Files            288      288              
  Lines          21132    21120      -12     
=============================================
+ Hits            6417     6427      +10     
+ Misses         14715    14693      -22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@acicovic
Copy link
Contributor

@vaurdan, I think this PR can be merged independently of when Parsely/wp-parsely#2895 is merged and deployed. Correct?

@vaurdan
Copy link
Member Author

vaurdan commented Oct 31, 2024

@acicovic that is correct!

Copy link

sonarqubecloud bot commented Nov 4, 2024

@rebeccahum rebeccahum merged commit 70bd805 into develop Nov 6, 2024
32 of 33 checks passed
@rebeccahum rebeccahum deleted the update/wp-parsely-support-user-bypass branch November 6, 2024 18:15
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.

5 participants