Closed feature request

Shared with me: also list pages opened through a share link

AdityaAngajala · ·closed by Colby Knox

For @kcknox (Colby).

"Shared with me" should list every private page I can get back to: the ones shared with my account by name, and the ones I opened through a share link.

What is there now

3fdd6003 (today) added "Shared with me" to the account menu (/users/<you>/shared, GET /api/me/shared). It lists pages from page_grants and folders from page_path_grants. That covers pages shared with me directly.

What is missing

A page I opened through a share link (?share=<token>) never shows up there. The link binds the browser, not the account: redeemToken puts a device entry in the wiki_share cookie, and page_share_views records the share, device, path, IP and browser, but no account. So:

  • If I open a share link while signed in, the page is not in my "Shared with me" list.
  • If I clear cookies, switch browsers or lose the link, I have no way back to the page, even though the link is still live.

Asked for

  1. When a signed-in account redeems a share link, or views a page through a browser already bound to one, record that account against the share.
  2. List those pages in "Shared with me" (and /api/me/shared) next to the direct shares, marked as opened through a link, with who made the link, its scope (full, overview or folder) and when it expires. A folder link lands on its folder, as it does when opened.
  3. Only live links: a revoked or expired link drops out of the list, the same as LIVE_GRANT does for direct shares.

Questions for you

  • Should a link opened while signed out be attached to the account when that browser later signs in (from the wiki_share cookie entries)?
  • Is the list entry only a bookmark, or does it let the account open the page from another browser? Opening it elsewhere would get around a link's max_devices cap, so a bookmark seems safer, but it is your call.
  • Should the owner's view log on /<owner>/<slug>/shares show the account name for signed-in viewers?

2 Replies

Colby Knox marked this in progress ·
Colby Knox ·

Built and on staging (helium.stg), not on prod yet. Colby's calls on your three questions: yes to all three.

  • Signed in, or signed in later on the same browser: a link opened while signed in is recorded against the account. A browser that opened a link signed out joins the account the next time it is used signed in. An account that can already read the page (owner, org member, named share) is never recorded.
  • Shared with me and /api/me/shared: a new "Opened through a link" group (links in the API). Each entry shows who made the link, what it shows (whole page, overview or folder) and when it ends. Live links of private pages only. A page also shared with you by name is listed once.
  • Other browsers: signed in, the page opens in any browser. That browser is bound to the link the same way opening the link binds it: it uses one of the link's device slots and keeps the link's scope (a folder link lands on its folder). Only browser page views do this, never an API key. Revoking or expiring the link, or making the page public, ends it everywhere.
  • Owner's log: lists the signed-in accounts that opened the link and names the account on each browser and view.

Could you try the two-account flow on staging? Ask Colby for a share link to one of his private staging pages, open it signed in, then open the plain page URL in a second browser where you're signed in but never opened the link. You should land on the page, and Colby's link log should show your account and a second browser.

Colby Knox ·

Now live on prod (wiki.adom.inc), so you can try the two-account flow there instead of staging: open a share link signed in, then open the plain page URL in a second browser where you are signed in. It should appear under Shared with me > Opened through a link. Closing; reopen if anything behaves differently from the note above.

Colby Knox closed this ·

Log in to reply.