pub async fn assert_can_view(
db: &SqlitePool,
current_user: Uuid,
destination: Destination,
) -> Result<Option<GroupRole>, Error>Expand description
Resolve a destination to whether the current user can view its
contents and (for groups) what role they have. Personal scope means the
user is the owner; otherwise Error::Forbidden is returned.
ยงErrors
Returns Error::Forbidden if the user is not a member of the target
group.