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.
- 
                  
                  
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_levelfield.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_levelset toeditor, then they will gain editor privileges. Thelink_access_levelis a property of the link, and does not depend on who is calling this API. In particular,link_access_leveldoes 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 } 
- 
                  
-initWithCanRevoke:visibilityPolicies: canSetExpiry: canRemoveExpiry: allowDownload: canAllowDownload: canDisallowDownload: allowComments: teamRestrictsComments: resolvedVisibility: requestedVisibility: revokeFailureReason: effectiveAudience: linkAccessLevel: audienceOptions: canSetPassword: canRemovePassword: requirePassword: canUseExtendedSharingControls: Full constructor for the struct (exposes all instance variables).
Declaration
Objective-C
- (nonnull instancetype) initWithCanRevoke:(nonnull NSNumber *)canRevoke visibilityPolicies: (nonnull NSArray<DBSHARINGVisibilityPolicy *> *) visibilityPolicies canSetExpiry:(nonnull NSNumber *)canSetExpiry canRemoveExpiry:(nonnull NSNumber *)canRemoveExpiry allowDownload:(nonnull NSNumber *)allowDownload canAllowDownload:(nonnull NSNumber *)canAllowDownload canDisallowDownload:(nonnull NSNumber *)canDisallowDownload allowComments:(nonnull NSNumber *)allowComments teamRestrictsComments:(nonnull NSNumber *)teamRestrictsComments resolvedVisibility: (nullable DBSHARINGResolvedVisibility *)resolvedVisibility requestedVisibility: (nullable DBSHARINGRequestedVisibility *)requestedVisibility revokeFailureReason: (nullable DBSHARINGSharedLinkAccessFailureReason *) revokeFailureReason effectiveAudience: (nullable DBSHARINGLinkAudience *)effectiveAudience linkAccessLevel: (nullable DBSHARINGLinkAccessLevel *)linkAccessLevel audienceOptions: (nullable NSArray<DBSHARINGLinkAudienceOption *> *) audienceOptions canSetPassword:(nullable NSNumber *)canSetPassword canRemovePassword:(nullable NSNumber *)canRemovePassword requirePassword:(nullable NSNumber *)requirePassword canUseExtendedSharingControls: (nullable NSNumber *)canUseExtendedSharingControls;Swift
init(canRevoke: NSNumber, visibilityPolicies: [DBSHARINGVisibilityPolicy], canSetExpiry: NSNumber, canRemoveExpiry: NSNumber, allowDownload: NSNumber, canAllowDownload: NSNumber, canDisallowDownload: NSNumber, allowComments: NSNumber, teamRestrictsComments: NSNumber, resolvedVisibility: DBSHARINGResolvedVisibility?, requestedVisibility: DBSHARINGRequestedVisibility?, revokeFailureReason: DBSHARINGSharedLinkAccessFailureReason?, effectiveAudience: DBSHARINGLinkAudience?, linkAccessLevel: DBSHARINGLinkAccessLevel?, audienceOptions: [DBSHARINGLinkAudienceOption]?, canSetPassword: NSNumber?, canRemovePassword: NSNumber?, requirePassword: NSNumber?, canUseExtendedSharingControls: NSNumber?)Parameters
canRevokeWhether the caller can revoke the shared link.
visibilityPoliciesA list of policies that the user might be able to set for the visibility.
canSetExpiryWhether 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.
canRemoveExpiryWhether the user can remove the expiry of the link.
allowDownloadWhether the link can be downloaded or not.
canAllowDownloadWhether the user can allow downloads via the link. This refers to the ability to remove a no-download restriction on the link.
canDisallowDownloadWhether the user can disallow downloads via the link. This refers to the ability to impose a no-download restriction on the link.
allowCommentsWhether comments are enabled for the linked file. This takes the team commenting policy into account.
teamRestrictsCommentsWhether the team has disabled commenting globally.
resolvedVisibilityThe 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.
requestedVisibilityThe 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.
revokeFailureReasonThe failure reason for revoking the link. This field will only be present if the canRevoke is false.
effectiveAudienceThe type of audience who can benefit from the access level specified by the
link_access_levelfield.linkAccessLevelThe 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_levelset toeditor, then they will gain editor privileges. Thelink_access_levelis a property of the link, and does not depend on who is calling this API. In particular,link_access_leveldoes not take into account the API caller’s current permissions to the content.audienceOptionsA list of link audience options the user might be able to set as the new audience.
canSetPasswordWhether the user can set a password for the link.
canRemovePasswordWhether the user can remove the password of the link.
requirePasswordWhether the user is required to provide a password to view the link.
canUseExtendedSharingControlsWhether the user can use extended sharing controls, based on their account type.
Return Value
An initialized instance.
 - 
                  
-initWithCanRevoke:visibilityPolicies: canSetExpiry: canRemoveExpiry: allowDownload: canAllowDownload: canDisallowDownload: allowComments: teamRestrictsComments: Convenience constructor (exposes only non-nullable instance variables with no default value).
Declaration
Objective-C
- (nonnull instancetype) initWithCanRevoke:(nonnull NSNumber *)canRevoke visibilityPolicies: (nonnull NSArray<DBSHARINGVisibilityPolicy *> *)visibilityPolicies canSetExpiry:(nonnull NSNumber *)canSetExpiry canRemoveExpiry:(nonnull NSNumber *)canRemoveExpiry allowDownload:(nonnull NSNumber *)allowDownload canAllowDownload:(nonnull NSNumber *)canAllowDownload canDisallowDownload:(nonnull NSNumber *)canDisallowDownload allowComments:(nonnull NSNumber *)allowComments teamRestrictsComments:(nonnull NSNumber *)teamRestrictsComments;Swift
init(canRevoke: NSNumber, visibilityPolicies: [DBSHARINGVisibilityPolicy], canSetExpiry: NSNumber, canRemoveExpiry: NSNumber, allowDownload: NSNumber, canAllowDownload: NSNumber, canDisallowDownload: NSNumber, allowComments: NSNumber, teamRestrictsComments: NSNumber)Parameters
canRevokeWhether the caller can revoke the shared link.
visibilityPoliciesA list of policies that the user might be able to set for the visibility.
canSetExpiryWhether 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.
canRemoveExpiryWhether the user can remove the expiry of the link.
allowDownloadWhether the link can be downloaded or not.
canAllowDownloadWhether the user can allow downloads via the link. This refers to the ability to remove a no-download restriction on the link.
canDisallowDownloadWhether the user can disallow downloads via the link. This refers to the ability to impose a no-download restriction on the link.
allowCommentsWhether comments are enabled for the linked file. This takes the team commenting policy into account.
teamRestrictsCommentsWhether the team has disabled commenting globally.
Return Value
An initialized instance.
 
View on GitHub
        DBSHARINGLinkPermissions Class Reference