DBSHARINGLinkPermissions

@interface 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.

  • 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).

    Declaration

    Objective-C

    @property (readonly, nonatomic, 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.

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

    @property (readonly, nonatomic) 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 (readonly, nonatomic, nullable)
        DBSHARINGSharedLinkAccessFailureReason *revokeFailureReason;

    Swift

    var revokeFailureReason: DBSHARINGSharedLinkAccessFailureReason? { get }
  • Full constructor for the struct (exposes all instance variables).

    Declaration

    Objective-C

    - (nonnull instancetype)
      initWithCanRevoke:(nonnull NSNumber *)canRevoke
     resolvedVisibility:(nullable DBSHARINGResolvedVisibility *)resolvedVisibility
    requestedVisibility:(nullable DBSHARINGRequestedVisibility *)requestedVisibility
    revokeFailureReason:
        (nullable DBSHARINGSharedLinkAccessFailureReason *)revokeFailureReason;

    Swift

    init(canRevoke: NSNumber, resolvedVisibility: DBSHARINGResolvedVisibility?, requestedVisibility: DBSHARINGRequestedVisibility?, revokeFailureReason: DBSHARINGSharedLinkAccessFailureReason?)

    Parameters

    canRevoke

    Whether the caller can revoke the shared link.

    resolvedVisibility

    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).

    requestedVisibility

    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.

    revokeFailureReason

    The failure reason for revoking the link. This field will only be present if the canRevoke is false.

    Return Value

    An initialized instance.

  • Convenience constructor (exposes only non-nullable instance variables with no default value).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithCanRevoke:(nonnull NSNumber *)canRevoke;

    Swift

    init(canRevoke: NSNumber)

    Parameters

    canRevoke

    Whether the caller can revoke the shared link.

    Return Value

    An initialized instance.