LinkPermissions

public class LinkPermissions : CustomStringConvertible, JSONRepresentable

The LinkPermissions struct

  • The current visibility of the link after considering the shared links policies of the the team (in case the link’s owner is part of a team) and the shared folder (in case the linked file is part of a shared folder). This field is shown only if the caller has access to this info (the link’s owner always has access to this data). For some links, an effective_audience value is returned instead.

    Declaration

    Swift

    public let resolvedVisibility: Sharing.ResolvedVisibility?
  • The shared link’s requested visibility. This can be overridden by the team and shared folder policies. The final visibility, after considering these policies, can be found in resolvedVisibility. This is shown only if the caller is the link’s owner and resolved_visibility is returned instead of effective_audience.

    Declaration

    Swift

    public let requestedVisibility: Sharing.RequestedVisibility?
  • Whether the caller can revoke the shared link.

    Declaration

    Swift

    public let canRevoke: Bool
  • The failure reason for revoking the link. This field will only be present if the canRevoke is false.

    Declaration

    Swift

    public let revokeFailureReason: Sharing.SharedLinkAccessFailureReason?
  • The type of audience who can benefit from the access level specified by the link_access_level field.

    Declaration

    Swift

    public let effectiveAudience: Sharing.LinkAudience?
  • The access level that the link will grant to its users. A link can grant additional rights to a user beyond their current access level. For example, if a user was invited as a viewer to a file, and then opens a link with link_access_level set to editor, then they will gain editor privileges. The link_access_level is a property of the link, and does not depend on who is calling this API. In particular, link_access_level does not take into account the API caller’s current permissions to the content.

    Declaration

    Swift

    public let linkAccessLevel: Sharing.LinkAccessLevel?
  • A list of policies that the user might be able to set for the visibility.

    Declaration

    Swift

    public let visibilityPolicies: [Sharing.VisibilityPolicy]
  • Whether the user can set the expiry settings of the link. This refers to the ability to create a new expiry and modify an existing expiry.

    Declaration

    Swift

    public let canSetExpiry: Bool
  • Whether the user can remove the expiry of the link.

    Declaration

    Swift

    public let canRemoveExpiry: Bool
  • Whether the link can be downloaded or not.

    Declaration

    Swift

    public let allowDownload: Bool
  • Whether the user can allow downloads via the link. This refers to the ability to remove a no-download restriction on the link.

    Declaration

    Swift

    public let canAllowDownload: Bool
  • Whether the user can disallow downloads via the link. This refers to the ability to impose a no-download restriction on the link.

    Declaration

    Swift

    public let canDisallowDownload: Bool
  • Whether comments are enabled for the linked file. This takes the team commenting policy into account.

    Declaration

    Swift

    public let allowComments: Bool
  • Whether the team has disabled commenting globally.

    Declaration

    Swift

    public let teamRestrictsComments: Bool
  • A list of link audience options the user might be able to set as the new audience.

    Declaration

    Swift

    public let audienceOptions: [Sharing.LinkAudienceOption]?
  • Whether the user can set a password for the link.

    Declaration

    Swift

    public let canSetPassword: Bool?
  • Whether the user can remove the password of the link.

    Declaration

    Swift

    public let canRemovePassword: Bool?
  • Whether the user is required to provide a password to view the link.

    Declaration

    Swift

    public let requirePassword: Bool?
  • Whether the user can use extended sharing controls, based on their account type.

    Declaration

    Swift

    public let canUseExtendedSharingControls: Bool?
  • Declaration

    Swift

    public var description: String { get }