Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 227
    • Issues 227
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 34
    • Merge Requests 34
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Packages
    • Packages
    • List
    • Container Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds Backend - EngineMinds Backend - Engine
  • Merge Requests
  • !359

Open
Opened 16 minutes ago by Ben Hayward@benhayward.ben
  • Report abuse
Report abuse

WIP: [Sprint/PinkPanther](fix): Stripping out blog body upon export.

Closes #1916

Summary

Blog paywalls are broken, it shows the text when you access the page, even if it should be behind a paywall

Rationale

$this->_eventsDispatcher->trigger('export:extender', 'blog', [ 'entity' => $this ], []) is not being triggered as was intended, so the body and description were never stripped.

https://gitlab.com/minds/engine/blob/master/Core/Wire/Paywall/Events.php#L70 is not used by any other classes, so I don't think its necessary to pass off to an event here. That being said I did try to get to the bottom of why that event was not being called, and could not. Many layers of abstraction around this that aren't documented.

From left to right

  • 1 - Owner account.
  • 2 - Not logged in.
  • 3 - Other account.

image

To test

  1. Make a blog, put it behind a paywall
  2. Check you can view the content on the owner account.
  3. Check that you cannot access the content when logged out.
  4. Check that you cannot access the content when on a secondary account that has not wired tokens previously to your primary.
  5. Pay for the blog on that account, and verify you can access it (if you need some, drop me a message).
Edited 9 minutes ago by Ben Hayward

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b "fix/blog-paywall-1916" "origin/fix/blog-paywall-1916"

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout "origin/master"
git merge --no-ff "fix/blog-paywall-1916"

Step 4. Push the result of the merge to GitLab

git push origin "master"

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

Request to merge fix/blog-paywall-1916 into master
The source branch is 8 commits behind the target branch
Open in Web IDE
  • Email patches
  • Plain diff
Pipeline #88020050 passed for 4167bc16 on fix/blog-paywall-1916
          Requires 3 more approvals from Devs, Deployers, and QA.
          Mark Harding
          Mark Harding
          Rami Albatal
          Rami Albatal
          Martin Santangelo
          Martin Santangelo
          Guy Thouret
          Guy Thouret
          Marcelo Rivera
          Marcelo Rivera
          This is a Work in Progress

          Deletes source branch

          You can merge this merge request manually using the
          • Discussion 0
          • Commits 1
          • Pipelines 1
          • Changes 1
          • Loading...
          • Ben Hayward @benhayward.ben added MR::Awaiting Review Squad::Yellow scoped labels 16 minutes ago

            added MR::Awaiting Review Squad::Yellow scoped labels

          • Ben Hayward @benhayward.ben marked as a Work In Progress 9 minutes ago

            marked as a Work In Progress

          • Ben Hayward @benhayward.ben changed the description 9 minutes ago

            changed the description

          • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
          Please register or sign in to reply
          0 Assignees
          None
          Assign to
          None
          Milestone
          None
          Assign milestone
          None
          Time tracking
          No estimate or time spent
          2
          Labels
          MR::Awaiting Review Squad::Yellow
          Assign labels
          • View project labels
          Lock merge request
          Unlocked
          10
          10 participants
          user avatar
          Mark Harding
          user avatar
          Rami Albatal
          user avatar
          Martin Santangelo
          user avatar
          Guy Thouret
          user avatar
          Marcelo Rivera
          user avatar
          Olivia Madrid
          user avatar
          Brian Hatchet
          Reference: minds/engine!359