Flipping "Published" 403'd with authorization_error, confirmed via a raw curl (bypassing our client entirely, real token) to be a genuine server-side restriction independent of this app — workspace public sharing is enabled, token is full-scope, it's not document-specific. Root cause is most likely Outline gating that action behind an interactive session rather than API-token auth, but that's not definitively confirmed server-side. Removed the toggle per explicit instruction; kept link create/copy/revoke and title override (same endpoint, not reported broken). Replaced it with real per-document user permissions: - OutlineMembership/OutlineDocumentMember models - documents.add_user (confirmed shape from official docs), documents.remove_user/documents.users (speculative, same "best-effort until a live server confirms" treatment OutlinePin originally got), users.list for the invite search (standard, high-confidence) - DocumentShareSheet gets a "People with access" section: search and invite with a Can-view/Can-edit picker, existing members listed with a remove button - Reader toolbar's long-disabled "Permissions…" menu item now opens this same sheet instead of doing nothing Sidebar's own disabled "Permissions…" stub has no sheet wired up to it yet — comment updated to be accurate, not fixed (use the reader's menu instead). documents.users/documents.remove_user are unverified against a live server, same as every other speculative endpoint this session — expect a correction round once tested.
16 lines
411 B
Swift
16 lines
411 B
Swift
import Foundation
|
|
|
|
/// For searching workspace members to invite to a document. Backed by
|
|
/// `users.list`.
|
|
public struct ListUsersRequest: Encodable, Sendable {
|
|
public let query: String?
|
|
public let offset: Int
|
|
public let limit: Int
|
|
|
|
public init(query: String? = nil, offset: Int = 0, limit: Int = 25) {
|
|
self.query = query
|
|
self.offset = offset
|
|
self.limit = limit
|
|
}
|
|
}
|