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 230
    • Issues 230
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 36
    • Merge Requests 36
  • 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 1 day 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

Solution

$this->_eventsDispatcher->trigger('export:extender', 'blog', [ 'entity' => $this ], []) is not being triggered as was intended, it appears that it is not registered correctly at, as the EventDispatcher never sees it. https://gitlab.com/minds/engine/blob/master/Core/Wire/Paywall/Events.php#L70 is not used by any other classes, so the solution I believe is to move the code into the blog namespace.

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 1 day 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
Open in Web IDE
  • Email patches
  • Plain diff
Pipeline #88029314 passed for 245e12cc on fix/blog-paywall-1916
          Requires 3 more approvals from Devs, Deployers, and QA.
          Martin Santangelo
          Martin Santangelo
          Mark Harding
          Mark Harding
          Brian Hatchet
          Brian Hatchet
          Rami Albatal
          Rami Albatal
          Marcelo Rivera
          Marcelo Rivera
          This is a Work in Progress

          Deletes source branch

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

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

          • Ben Hayward @benhayward.ben marked as a Work In Progress 1 day ago

            marked as a Work In Progress

          • Ben Hayward @benhayward.ben changed the description 1 day ago

            changed the description

          • Ben Hayward @benhayward.ben added 9 commits 1 day ago

            added 9 commits

            • 4167bc16...142d395f - 8 commits from branch master
            • deaf18e5 - Register event in the correct namespace. #1916

            Compare with previous version

          • Ben Hayward @benhayward.ben added 1 commit 1 day ago

            added 1 commit

            • 245e12cc - Removed old handler

            Compare with previous version

          • Ben Hayward @benhayward.ben changed the description 1 day ago

            changed the description

          • Xander Miller
            Xander Miller @xander-miller · 2 hours ago
            Developer

            When this bug is resolved @javanick Should follow up with minds::@cellblock07208 and minds::@medworthy to thank them and tell them it's fixed.

          • 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
          12
          12 participants
          user avatar
          Martin Santangelo
          user avatar
          Mark Harding
          user avatar
          Brian Hatchet
          user avatar
          Rami Albatal
          user avatar
          Marcelo Rivera
          user avatar
          Emiliano Balbuena
          user avatar
          Olivia Madrid
          Reference: minds/engine!359