Skip to content

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 by Brian Hatchet

Merge request reports