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 233
    • Issues 233
    • 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
  • !349

Open
Opened 22 hours ago by Brian Hatchet@brianhatchet:speech_balloon:
  • Report abuse
Report abuse

Chore refactor permissions export

Just exporting the entity permissions itself

TO QA

On the review sites, the permissions flag is already on, but we'll need to make sure the permissions feature flag is set on staging. @edgebal and @benhayward.ben were working on a cookie mechanism.

When you load up https://chore-refactor-permissions-export.minds.io/newsfeed/subscriptions

Look at the responses for loading a feed

https://chore-refactor-permissions-export.minds.io/api/v2/feeds/subscribed/activities?sync=1&limit=150&as_activities=0&from_timestamp=

The requests should be coming back with a permissions object on the entities, that has a role and a series of flags

This is the properly-formed request coming out of a v1/newsfeed/single/{guid} endpoint

https://chore-refactor-permissions-export.minds.io/api/v1/newsfeed/single/1023986589589573649?


{
  "status": "success",
  "activity": {
    "guid": "1023986589589573649",
    "type": "activity",
    "time_created": "1569513427",
    "time_updated": "1569513427",
    "container_guid": "997650977647497234",
    "owner_guid": "997650977647497234",
    "access_id": "2",
    "tags": [
      
    ],
    "nsfw": [
      
    ],
    "nsfw_lock": [
      
    ],
    "allow_comments": true,
    "title": false,
    "blurb": false,
    "perma_url": false,
    "message": "Say Emi",
    "ownerObj": {
      "guid": "997650977647497234",
      "type": "user",
      "subtype": false,
      "time_created": "1563234528",
      "time_updated": false,
      "container_guid": "0",
      "owner_guid": "0",
      "site_guid": false,
      "access_id": "2",
      "tags": [
        
      ],
      "nsfw": [
        
      ],
      "nsfw_lock": [
        
      ],
      "allow_comments": false,
      "name": "Brian Hatchet !!!",
      "username": "brianhatchet2",
      "language": "en",
      "icontime": "1567556483",
      "legacy_guid": false,
      "featured_id": false,
      "banned": "no",
      "ban_reason": false,
      "website": "",
      "briefdescription": "dsada",
      "dob": "",
      "gender": "",
      "city": "saddasads",
      "merchant": false,
      "boostProPlus": false,
      "fb": false,
      "mature": 0,
      "monetized": "",
      "signup_method": false,
      "social_profiles": [
        
      ],
      "feature_flags": false,
      "programs": [
        
      ],
      "plus": true,
      "hashtags": false,
      "verified": false,
      "founder": false,
      "disabled_boost": false,
      "boost_autorotate": true,
      "categories": [
        
      ],
      "wire_rewards": null,
      "pinned_posts": [
        
      ],
      "is_mature": false,
      "mature_lock": false,
      "last_accepted_tos": 1,
      "opted_in_hashtags": 1,
      "last_avatar_upload": "1566410594",
      "canary": false,
      "theme": "dark",
      "toaster_notifications": true,
      "mode": 1,
      "btc_address": "",
      "chat": true,
      "urn": "urn:user:997650977647497234",
      "subscribed": false,
      "subscriber": false,
      "boost_rating": 1,
      "pro": false,
      "rewards": false,
      "p2p_media_enabled": false,
      "is_admin": false,
      "onchain_booster": 0,
      "eth_wallet": "",
      "rating": 1
    },
    "containerObj": false,
    "thumbnail_src": false,
    "remind_object": false,
    "entity_guid": false,
    "featured": false,
    "featured_guid": false,
    "custom_type": false,
    "custom_data": false,
    "thumbs:up:count": 0,
    "thumbs:up:user_guids": [
      
    ],
    "thumbs:down:count": 0,
    "thumbs:down:user_guids": false,
    "p2p_boosted": false,
    "mature": false,
    "monetized": false,
    "paywall": "",
    "edited": "",
    "comments_enabled": true,
    "wire_totals": {
      "tokens": "0"
    },
    "boost_rejection_reason": -1,
    "pending": "",
    "rating": 2,
    "ephemeral": false,
    "hide_impressions": false,
    "pinned": false,
    "comments:count": 1,
    "urn": "urn:activity:1023986589589573649",
    "impressions": 25,
    "reminds": 0,
    "wire_threshold": null,
    "time_sent": null,
    "thumbnails": [
      
    ],
    "permissions": {
      "name": "entity_owner",
      "permissions": [
        "edit_post",
        "delete_post",
        "view",
        "create_comment",
        "edit_comment",
        "delete_comment",
        "vote",
        "remind",
        "wire"
      ]
    }
  }
}


Edited 16 hours ago by Brian Hatchet

Check out, review, and merge locally

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

git fetch origin
git checkout -b "chore-refactor-permissions-export" "origin/chore-refactor-permissions-export"

Step 2. Review the changes locally

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

git fetch origin
git checkout "origin/epic/permissions-28"
git merge --no-ff "chore-refactor-permissions-export"

Step 4. Push the result of the merge to GitLab

git push origin "epic/permissions-28"

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 chore-refactor-permissions-export into epic/permissions-28
Open in Web IDE
  • Email patches
  • Plain diff
Pipeline #86323373 passed for f4602932 on chore-refactor-permissions-export
          Requires 3 more approvals from Devs, Deployers, and QA.
          Mark Harding
          Mark Harding
          Ben Hayward
          Ben Hayward
          Emiliano Balbuena
          Emiliano Balbuena
          Olivia Madrid
          Olivia Madrid
          Rami Albatal
          Rami Albatal
          Ready to be merged automatically. Ask someone with write access to this repository to merge this request

          Deletes source branch

          • Discussion 9
          • Commits 10
          • Pipelines 8
          • Changes 6
          3/3 threads resolved
          • Loading...
          • Brian Hatchet :speech_balloon: @brianhatchet changed milestone to %Permission #review 22 hours ago

            changed milestone to %Permission #review

          • Brian Hatchet :speech_balloon: @brianhatchet added Sprint::09/25 - Oldfashioned Owl Squad::Green scoped labels 22 hours ago

            added Sprint::09/25 - Oldfashioned Owl Squad::Green scoped labels

          • Brian Hatchet :speech_balloon: @brianhatchet changed target branch from master to epic/permissions-28 22 hours ago

            changed target branch from master to epic/permissions-28

          • Marcelo Rivera @eiennohi approved this merge request 22 hours ago

            approved this merge request

          • Brian Hatchet :speech_balloon: @brianhatchet changed the description 2 times within 2 minutes 22 hours ago

            changed the description 2 times within 2 minutes

          • Marcelo Rivera @eiennohi added 1 commit 21 hours ago

            added 1 commit

            • fd0e5557 - (feat): channel owner should be able to create new groups

            Compare with previous version

          • Brian Hatchet :speech_balloon: @brianhatchet added 3 commits 20 hours ago

            added 3 commits

            • 05c44a86 - Exporting entities via exportable on single
            • 7f7e9b9c - Not adding my backup
            • e3689bc7 - Merge branch 'chore-refactor-permissions-export' of gitlab.com:minds/engine...

            Compare with previous version

          • Brian Hatchet :speech_balloon: @brianhatchet added 6 commits 19 hours ago

            added 6 commits

            • e3689bc7...c9daabe0 - 5 commits from branch epic/permissions-28
            • 12231b32 - Merge branch 'epic/permissions-28' into chore-refactor-permissions-export

            Compare with previous version

          • Brian Hatchet :speech_balloon: @brianhatchet added 1 commit 17 hours ago

            added 1 commit

            • 3f2d80e8 - Exporting single entities properly

            Compare with previous version

          • Brian Hatchet :speech_balloon: @brianhatchet added 1 commit 17 hours ago

            added 1 commit

            • 2b856941 - Need the manager there, Brian

            Compare with previous version

          • Brian Hatchet :speech_balloon: @brianhatchet changed the description 16 hours ago

            changed the description

          • Emiliano Balbuena @edgebal approved this merge request 14 hours ago

            approved this merge request

          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 6 hours ago
            Resolved by Brian Hatchet 59 minutes ago
          • Mark Harding
            Mark Harding @markeharding started a thread on an old version of the diff 6 hours ago
            Resolved by Brian Hatchet 56 minutes ago
          • Mark Harding
            Mark Harding @markeharding started a thread on an old version of the diff 6 hours ago
            Resolved by Brian Hatchet 56 minutes ago
          • Mark Harding @markeharding added MR::Requires Changes scoped label 6 hours ago

            added MR::Requires Changes scoped label

          • Mark Harding
            Mark Harding @markeharding · 6 hours ago
            Owner

            Composer.phar also need removing

          • Brian Hatchet :speech_balloon: @brianhatchet resolved all threads 56 minutes ago

            resolved all threads

          • Brian Hatchet
            Brian Hatchet :speech_balloon: @brianhatchet · 56 minutes ago
            Developer

            Removed

          • Brian Hatchet :speech_balloon: @brianhatchet added 1 commit 53 minutes ago

            added 1 commit

            • e00038bf - MR changes

            Compare with previous version

          • Brian Hatchet :speech_balloon: @brianhatchet added 1 commit 38 minutes ago

            added 1 commit

            • f4602932 - ElggEntity.php fixes

            Compare with previous version

          • Brian Hatchet :speech_balloon: @brianhatchet added MR::Awaiting Review scoped label and automatically removed MR::Requires Changes label 38 minutes ago

            added MR::Awaiting Review scoped label and automatically removed MR::Requires Changes label

          • 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
          Assignee
          Brian Hatchet's avatar
          Brian Hatchet @brianhatchet
          Assign to
          Permission #review
          Milestone
          Permission #review
          Assign milestone
          None
          Time tracking
          No estimate or time spent
          3
          Labels
          MR::Awaiting Review Sprint::09/25 - Oldfashioned Owl Squad::Green
          Assign labels
          • View project labels
          Lock merge request
          Unlocked
          10
          10 participants
          user avatar
          Mark Harding
          user avatar
          Ben Hayward
          user avatar
          Emiliano Balbuena
          user avatar
          Olivia Madrid
          user avatar
          Rami Albatal
          user avatar
          Martin Santangelo
          user avatar
          Guy Thouret
          Reference: minds/engine!349