Class FilesPermissionHelper
- Namespace
- Dynamicweb.Content.Files
- Assembly
- Dynamicweb.dll
Represents a helper to work with file and folder permissions.
[Obsolete("Do not use")]
public class FilesPermissionHelper
- Inheritance
-
FilesPermissionHelper
- Inherited Members
Properties
IsAngelOrAdministrator
Gets a value indicating if the current user is administrator.
[Obsolete("Do not use")]
public static bool IsAngelOrAdministrator { get; }
Property Value
- bool
true
if the current user is administrator; otherwisefalse
.
IsAngelOrSystemAdministrator
Gets a value indicating if the current user is angel or system administrator.
[Obsolete("Do not use")]
public static bool IsAngelOrSystemAdministrator { get; }
Property Value
- bool
true
if the current user is angel or system administrator; otherwisefalse
.
Methods
CopyPermissions(string, string)
Copy the permissions of the current folder and its subfolders.
public static void CopyPermissions(string sourcePath, string targetPath)
Parameters
DeletePermissions(string)
Deletes the permissions of the current folder and its subfolders.
public static void DeletePermissions(string sourcePath)
Parameters
sourcePath
string
GetParentFolderPath(string)
Gets the parent folder path.
public static string GetParentFolderPath(string folderPath)
Parameters
folderPath
string- The folder path.
Returns
- string
- System.String.
GetPermissionLevel(string)
Determines user permission level to a folder.
public static PermissionLevel GetPermissionLevel(string relativePath)
Parameters
relativePath
string- Name of the folder.
Returns
- PermissionLevel
- High permission level of current user to a folder.
HasAccess(string, PermissionLevel)
Determines whether a user has access to a folder or not.
public static bool HasAccess(string relativePath, PermissionLevel permissionLevel)
Parameters
relativePath
string- Name of the folder.
permissionLevel
PermissionLevel
Returns
- bool
true
if current user has access to a folder; otherwise,false
.
HasAccessToSecureFolder(string)
Determines whether a user has access to a folder or not.
public static bool HasAccessToSecureFolder(string fullPath)
Parameters
fullPath
string- Name of the folder.
Returns
- bool
true
if current user has access to a secure folder; otherwise,false
.
Remarks
If folder is not a secure folder function returns
true
HasRestrictedContent(string)
Determines whether a folder has restricted content or not.
public static bool HasRestrictedContent(string relativePath)
Parameters
relativePath
string- The requested folder.
Returns
MovePermissions(string, string)
Moves the permissions of the current folder and its subfolders.
public static void MovePermissions(string sourcePath, string targetPath)
Parameters
UseNewPermission()
Gets a value indicating that new permission mode is used.
[Obsolete("Do not use")]
public static bool UseNewPermission()