DBSHARINGLinkPermissions

Objective-C

@interface DBSHARINGLinkPermissions : NSObject <DBSerializable, NSCopying>

Swift

class DBSHARINGLinkPermissions : NSObject, DBSerializable, NSCopying

The LinkPermissions struct.

This class implements the DBSerializable protocol (serialize and deserialize instance methods), which is required for all Obj-C SDK API route objects.

Instance fields

  • 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

    Objective-C

    @property (nonatomic, readonly, nullable) DBSHARINGResolvedVisibility *resolvedVisibility;

    Swift

    var resolvedVisibility: DBSHARINGResolvedVisibility? { get }
  • 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

    Objective-C

    @property (nonatomic, readonly, nullable) DBSHARINGRequestedVisibility *requestedVisibility;

    Swift

    var requestedVisibility: DBSHARINGRequestedVisibility? { get }
  • Whether the caller can revoke the shared link.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull canRevoke;

    Swift

    var canRevoke: NSNumber { get }
  • The failure reason for revoking the link. This field will only be present if the canRevoke is false.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) DBSHARINGSharedLinkAccessFailureReason *revokeFailureReason;

    Swift

    var revokeFailureReason: DBSHARINGSharedLinkAccessFailureReason? { get }
  • The type of audience who can benefit from the access level specified by the link_access_level field.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) DBSHARINGLinkAudience *effectiveAudience;

    Swift

    var effectiveAudience: DBSHARINGLinkAudience? { get }
  • 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

    Objective-C

    @property (nonatomic, readonly, nullable) DBSHARINGLinkAccessLevel *linkAccessLevel;

    Swift

    var linkAccessLevel: DBSHARINGLinkAccessLevel? { get }
  • A list of policies that the user might be able to set for the visibility.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<DBSHARINGVisibilityPolicy *> *_Nonnull visibilityPolicies;

    Swift

    var visibilityPolicies: [DBSHARINGVisibilityPolicy] { get }
  • 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

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull canSetExpiry;

    Swift

    var canSetExpiry: NSNumber { get }
  • Whether the user can remove the expiry of the link.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull canRemoveExpiry;

    Swift

    var canRemoveExpiry: NSNumber { get }
  • Whether the link can be downloaded or not.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull allowDownload;

    Swift

    var allowDownload: NSNumber { get }
  • Whether the user can allow downloads via the link. This refers to the ability to remove a no-download restriction on the link.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull canAllowDownload;

    Swift

    var canAllowDownload: NSNumber { get }
  • Whether the user can disallow downloads via the link. This refers to the ability to impose a no-download restriction on the link.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull canDisallowDownload;

    Swift

    var canDisallowDownload: NSNumber { get }
  • Whether comments are enabled for the linked file. This takes the team commenting policy into account.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull allowComments;

    Swift

    var allowComments: NSNumber { get }
  • Whether the team has disabled commenting globally.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull teamRestrictsComments;

    Swift

    var teamRestrictsComments: NSNumber { get }
  • A list of link audience options the user might be able to set as the new audience.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSArray<DBSHARINGLinkAudienceOption *> *audienceOptions;

    Swift

    var audienceOptions: [DBSHARINGLinkAudienceOption]? { get }
  • Whether the user can set a password for the link.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *canSetPassword;

    Swift

    var canSetPassword: NSNumber? { get }
  • Whether the user can remove the password of the link.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *canRemovePassword;

    Swift

    var canRemovePassword: NSNumber? { get }
  • Whether the user is required to provide a password to view the link.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *requirePassword;

    Swift

    var requirePassword: NSNumber? { get }
  • Whether the user can use extended sharing controls, based on their account type.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *canUseExtendedSharingControls;

    Swift

    var canUseExtendedSharingControls: NSNumber? { get }

Constructors