Dropbox .NET SDK
Show / Hide Table of Contents

Class LinkPermissions

The link permissions object

Inheritance
object
LinkPermissions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Dropbox.Api.Sharing
Assembly: Dropbox.Api.dll
Syntax
public class LinkPermissions

Constructors

View Source

LinkPermissions(bool, IEnumerable<VisibilityPolicy>, bool, bool, bool, bool, bool, bool, bool, ResolvedVisibility, RequestedVisibility, SharedLinkAccessFailureReason, LinkAudience, LinkAccessLevel, IEnumerable<LinkAudienceOption>, bool?, bool?, bool?, bool?, bool?, bool?, EnforceLinkPasswordPolicy, DefaultLinkExpirationDaysPolicy, ChangeLinkExpirationPolicy)

Initializes a new instance of the LinkPermissions class.

Declaration
public LinkPermissions(bool canRevoke, IEnumerable<VisibilityPolicy> visibilityPolicies, bool canSetExpiry, bool canRemoveExpiry, bool allowDownload, bool canAllowDownload, bool canDisallowDownload, bool allowComments, bool teamRestrictsComments, ResolvedVisibility resolvedVisibility = null, RequestedVisibility requestedVisibility = null, SharedLinkAccessFailureReason revokeFailureReason = null, LinkAudience effectiveAudience = null, LinkAccessLevel linkAccessLevel = null, IEnumerable<LinkAudienceOption> audienceOptions = null, bool? canSetPassword = null, bool? canRemovePassword = null, bool? requirePassword = null, bool? canUseExtendedSharingControls = null, bool? canSync = null, bool? canRequestAccess = null, EnforceLinkPasswordPolicy enforceSharedLinkPasswordPolicy = null, DefaultLinkExpirationDaysPolicy daysToExpirePolicy = null, ChangeLinkExpirationPolicy changeSharedLinkExpirationPolicy = null)
Parameters
Type Name Description
bool canRevoke

Whether the caller can revoke the shared link.

IEnumerable<VisibilityPolicy> visibilityPolicies

A list of policies that the user might be able to set for the visibility.

bool canSetExpiry

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.

bool canRemoveExpiry

Whether the user can remove the expiry of the link.

bool allowDownload

Whether the link can be downloaded or not.

bool canAllowDownload

Whether the user can allow downloads via the link. This refers to the ability to remove a no-download restriction on the link.

bool canDisallowDownload

Whether the user can disallow downloads via the link. This refers to the ability to impose a no-download restriction on the link.

bool allowComments

Field is deprecated. Whether comments are enabled for the linked file. This takes the team commenting policy into account.

bool teamRestrictsComments

Field is deprecated. Whether the team has disabled commenting globally.

ResolvedVisibility 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). For some links, an effective_audience value is returned instead.

RequestedVisibility 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 and resolved_visibility is returned instead of effective_audience.

SharedLinkAccessFailureReason revokeFailureReason

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

LinkAudience effectiveAudience

The type of audience who can benefit from the access level specified by the link_access_level field.

LinkAccessLevel linkAccessLevel

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.

IEnumerable<LinkAudienceOption> audienceOptions

A list of link audience options the user might be able to set as the new audience.

bool? canSetPassword

Whether the user can set a password for the link.

bool? canRemovePassword

Whether the user can remove the password of the link.

bool? requirePassword

Whether the user is required to provide a password to view the link.

bool? canUseExtendedSharingControls

Whether the user can use extended sharing controls, based on their account type.

bool? canSync

Whether a user can save the content to their Dropbox account.

bool? canRequestAccess

Whether the user can request access to the content.

EnforceLinkPasswordPolicy enforceSharedLinkPasswordPolicy

Whether the updated externally available shared link must have password set. Not provided if the link is not team owned.

DefaultLinkExpirationDaysPolicy daysToExpirePolicy

Existing owning team's policy for default number of days from today to link's expiration. Not provided if the link is not team owned.

ChangeLinkExpirationPolicy changeSharedLinkExpirationPolicy

When owning team's policy changeSharedLinkExpirationPolicy is ChangeLinkExpirationPolicy.NotAllowed, the updated externally available shared link expiration value cannot be less strict than daysToExpirePolicy. In this case daysToExpirePolicy is expected to be different from none. Not provided if the link is not team owned.

Properties

View Source

AllowComments

Field is deprecated. Whether comments are enabled for the linked file. This takes the team commenting policy into account.

Declaration
public bool AllowComments { get; protected set; }
Property Value
Type Description
bool
View Source

AllowDownload

Whether the link can be downloaded or not.

Declaration
public bool AllowDownload { get; protected set; }
Property Value
Type Description
bool
View Source

AudienceOptions

A list of link audience options the user might be able to set as the new audience.

Declaration
public IList<LinkAudienceOption> AudienceOptions { get; protected set; }
Property Value
Type Description
IList<LinkAudienceOption>
View Source

CanAllowDownload

Whether the user can allow downloads via the link. This refers to the ability to remove a no-download restriction on the link.

Declaration
public bool CanAllowDownload { get; protected set; }
Property Value
Type Description
bool
View Source

CanDisallowDownload

Whether the user can disallow downloads via the link. This refers to the ability to impose a no-download restriction on the link.

Declaration
public bool CanDisallowDownload { get; protected set; }
Property Value
Type Description
bool
View Source

CanRemoveExpiry

Whether the user can remove the expiry of the link.

Declaration
public bool CanRemoveExpiry { get; protected set; }
Property Value
Type Description
bool
View Source

CanRemovePassword

Whether the user can remove the password of the link.

Declaration
public bool? CanRemovePassword { get; protected set; }
Property Value
Type Description
bool?
View Source

CanRequestAccess

Whether the user can request access to the content.

Declaration
public bool? CanRequestAccess { get; protected set; }
Property Value
Type Description
bool?
View Source

CanRevoke

Whether the caller can revoke the shared link.

Declaration
public bool CanRevoke { get; protected set; }
Property Value
Type Description
bool
View Source

CanSetExpiry

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
public bool CanSetExpiry { get; protected set; }
Property Value
Type Description
bool
View Source

CanSetPassword

Whether the user can set a password for the link.

Declaration
public bool? CanSetPassword { get; protected set; }
Property Value
Type Description
bool?
View Source

CanSync

Whether a user can save the content to their Dropbox account.

Declaration
public bool? CanSync { get; protected set; }
Property Value
Type Description
bool?
View Source

CanUseExtendedSharingControls

Whether the user can use extended sharing controls, based on their account type.

Declaration
public bool? CanUseExtendedSharingControls { get; protected set; }
Property Value
Type Description
bool?
View Source

ChangeSharedLinkExpirationPolicy

When owning team's policy ChangeSharedLinkExpirationPolicy is ChangeLinkExpirationPolicy.NotAllowed, the updated externally available shared link expiration value cannot be less strict than DaysToExpirePolicy. In this case DaysToExpirePolicy is expected to be different from `none`. Not provided if the link is not team owned.

Declaration
public ChangeLinkExpirationPolicy ChangeSharedLinkExpirationPolicy { get; protected set; }
Property Value
Type Description
ChangeLinkExpirationPolicy
View Source

DaysToExpirePolicy

Existing owning team's policy for default number of days from today to link's expiration. Not provided if the link is not team owned.

Declaration
public DefaultLinkExpirationDaysPolicy DaysToExpirePolicy { get; protected set; }
Property Value
Type Description
DefaultLinkExpirationDaysPolicy
View Source

EffectiveAudience

The type of audience who can benefit from the access level specified by the `link_access_level` field.

Declaration
public LinkAudience EffectiveAudience { get; protected set; }
Property Value
Type Description
LinkAudience
View Source

EnforceSharedLinkPasswordPolicy

Whether the updated externally available shared link must have password set. Not provided if the link is not team owned.

Declaration
public EnforceLinkPasswordPolicy EnforceSharedLinkPasswordPolicy { get; protected set; }
Property Value
Type Description
EnforceLinkPasswordPolicy
View Source

LinkAccessLevel

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
public LinkAccessLevel LinkAccessLevel { get; protected set; }
Property Value
Type Description
LinkAccessLevel
View Source

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 and resolved_visibility is returned instead of effective_audience.

Declaration
public RequestedVisibility RequestedVisibility { get; protected set; }
Property Value
Type Description
RequestedVisibility
View Source

RequirePassword

Whether the user is required to provide a password to view the link.

Declaration
public bool? RequirePassword { get; protected set; }
Property Value
Type Description
bool?
View Source

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). For some links, an effective_audience value is returned instead.

Declaration
public ResolvedVisibility ResolvedVisibility { get; protected set; }
Property Value
Type Description
ResolvedVisibility
View Source

RevokeFailureReason

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

Declaration
public SharedLinkAccessFailureReason RevokeFailureReason { get; protected set; }
Property Value
Type Description
SharedLinkAccessFailureReason
View Source

TeamRestrictsComments

Field is deprecated. Whether the team has disabled commenting globally.

Declaration
public bool TeamRestrictsComments { get; protected set; }
Property Value
Type Description
bool
View Source

VisibilityPolicies

A list of policies that the user might be able to set for the visibility.

Declaration
public IList<VisibilityPolicy> VisibilityPolicies { get; protected set; }
Property Value
Type Description
IList<VisibilityPolicy>

See Also

FileLinkMetadata
FolderLinkMetadata
SharedLinkMetadata
  • View Source
In this article
Back to top Dropbox .NET SDK