You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
channel: Add selfHasContentAccess, using canSubscribeGroup et al
Fixes#814.
Fixes part of #1786.
The general implementation of group-based permissions (#814)
was added in the commits leading up to this one. This commit
demonstrates implementing a given such permission.
Then we also use the new permission in one place where we already
want to use it, toward #1786. (There's another part of #1786 which
calls for a variation: determining whether the user would be able
to re-subscribe to a channel if they unsubscribe. We'll leave that
for a follow-up.) We'll also be adding a more prominent bit of UI
that wants this permission soon: the list of channels, #188.
To exercise this method on real data, I added some debugging prints
that printed a list of the channels where this returned true, and a
list of the channels where it returned false. I also manually tested
the change for #1786, by visiting an unsubscribed private channel
(via the link in a #-mention), long-pressing the app bar to get the
channel action sheet, and then (as another user, on web) adding and
removing permission for the test user to subscribe themself.
0 commit comments