• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class PermissionProvider

Inheritance
System.Object
PermissionProvider
CorePermissionProvider
Namespace: DotNetNuke.Security.Permissions
Assembly: DotNetNuke.dll
Syntax
public class PermissionProvider : object

Properties

| Improve this Doc View Source

LocalResourceFile

Declaration
public virtual string LocalResourceFile { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

CanAddContentToPage(TabInfo)

Returns a flag indicating whether the current user can add content to a page.

Declaration
public virtual bool CanAddContentToPage(TabInfo tab)
Parameters
Type Name Description
TabInfo tab

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanAddFolder(FolderInfo)

Returns a flag indicating whether the current user can add a folder or file.

Declaration
public virtual bool CanAddFolder(FolderInfo folder)
Parameters
Type Name Description
FolderInfo folder

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanAddPage(TabInfo)

Returns a flag indicating whether the current user can add a child page to a page.

Declaration
public virtual bool CanAddPage(TabInfo tab)
Parameters
Type Name Description
TabInfo tab

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanAddTopLevel(Int32)

Returns a flag indicating whether the current user can add top level pages.

Declaration
public virtual bool CanAddTopLevel(int portalId)
Parameters
Type Name Description
System.Int32 portalId

The id of the portal.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanAdminFolder(FolderInfo)

Returns a flag indicating whether the current user can administer a folder.

Declaration
public virtual bool CanAdminFolder(FolderInfo folder)
Parameters
Type Name Description
FolderInfo folder

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanAdminModule(ModuleInfo)

Returns a flag indicating whether the current user can administer a module.

Declaration
public virtual bool CanAdminModule(ModuleInfo module)
Parameters
Type Name Description
ModuleInfo module

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanAdminPage(TabInfo)

Returns a flag indicating whether the current user can administer a page.

Declaration
public virtual bool CanAdminPage(TabInfo tab)
Parameters
Type Name Description
TabInfo tab

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanBrowseFolder(FolderInfo)

Returns a flag indicating whether the current user can browse the folder.

Declaration
public virtual bool CanBrowseFolder(FolderInfo folder)
Parameters
Type Name Description
FolderInfo folder

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanCopyFolder(FolderInfo)

Returns a flag indicating whether the current user can copy a folder or file.

Declaration
public virtual bool CanCopyFolder(FolderInfo folder)
Parameters
Type Name Description
FolderInfo folder

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanCopyPage(TabInfo)

Returns a flag indicating whether the current user can copy a page.

Declaration
public virtual bool CanCopyPage(TabInfo tab)
Parameters
Type Name Description
TabInfo tab

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanDeleteFolder(FolderInfo)

Returns a flag indicating whether the current user can delete a folder or file.

Declaration
public virtual bool CanDeleteFolder(FolderInfo folder)
Parameters
Type Name Description
FolderInfo folder

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanDeleteModule(ModuleInfo)

Returns a flag indicating whether the current user can delete a module.

Declaration
public virtual bool CanDeleteModule(ModuleInfo module)
Parameters
Type Name Description
ModuleInfo module

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanDeletePage(TabInfo)

Returns a flag indicating whether the current user can delete a page.

Declaration
public virtual bool CanDeletePage(TabInfo tab)
Parameters
Type Name Description
TabInfo tab

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanEditModuleContent(ModuleInfo)

Returns a flag indicating whether the current user can edit module content.

Declaration
public virtual bool CanEditModuleContent(ModuleInfo module)
Parameters
Type Name Description
ModuleInfo module

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanExportModule(ModuleInfo)

Returns a flag indicating whether the current user can export a module.

Declaration
public virtual bool CanExportModule(ModuleInfo module)
Parameters
Type Name Description
ModuleInfo module

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanExportPage(TabInfo)

Returns a flag indicating whether the current user can export a page.

Declaration
public virtual bool CanExportPage(TabInfo tab)
Parameters
Type Name Description
TabInfo tab

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanImportModule(ModuleInfo)

Returns a flag indicating whether the current user can import a module.

Declaration
public virtual bool CanImportModule(ModuleInfo module)
Parameters
Type Name Description
ModuleInfo module

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanImportPage(TabInfo)

Returns a flag indicating whether the current user can import a page.

Declaration
public virtual bool CanImportPage(TabInfo tab)
Parameters
Type Name Description
TabInfo tab

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanManageFolder(FolderInfo)

Returns a flag indicating whether the current user can manage a folder's settings.

Declaration
public virtual bool CanManageFolder(FolderInfo folder)
Parameters
Type Name Description
FolderInfo folder

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanManageModule(ModuleInfo)

Returns a flag indicating whether the current user can manage a module's settings.

Declaration
public virtual bool CanManageModule(ModuleInfo module)
Parameters
Type Name Description
ModuleInfo module

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanManagePage(TabInfo)

Returns a flag indicating whether the current user can manage a page's settings.

Declaration
public virtual bool CanManagePage(TabInfo tab)
Parameters
Type Name Description
TabInfo tab

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanNavigateToPage(TabInfo)

Returns a flag indicating whether the current user can see a page in a navigation object.

Declaration
public virtual bool CanNavigateToPage(TabInfo tab)
Parameters
Type Name Description
TabInfo tab

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanViewFolder(FolderInfo)

Returns a flag indicating whether the current user can view a folder or file.

Declaration
public virtual bool CanViewFolder(FolderInfo folder)
Parameters
Type Name Description
FolderInfo folder

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanViewModule(ModuleInfo)

Returns a flag indicating whether the current user can view a module.

Declaration
public virtual bool CanViewModule(ModuleInfo module)
Parameters
Type Name Description
ModuleInfo module

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanViewPage(TabInfo)

Returns a flag indicating whether the current user can view a page.

Declaration
public virtual bool CanViewPage(TabInfo tab)
Parameters
Type Name Description
TabInfo tab

The page.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

DeleteFolderPermissionsByUser(UserInfo)

Declaration
public virtual void DeleteFolderPermissionsByUser(UserInfo objUser)
Parameters
Type Name Description
UserInfo objUser
| Improve this Doc View Source

DeleteModulePermissionsByUser(UserInfo)

DeleteModulePermissionsByUser deletes a user's Module Permission in the Database.

Declaration
public virtual void DeleteModulePermissionsByUser(UserInfo user)
Parameters
Type Name Description
UserInfo user

The user.

| Improve this Doc View Source

DeletePortalPermissionsByUser(UserInfo)

DeletePortalPermissionsByUser deletes a user's Portal Permissions in the Database.

Declaration
public virtual void DeletePortalPermissionsByUser(UserInfo user)
Parameters
Type Name Description
UserInfo user

The user.

| Improve this Doc View Source

DeleteTabPermissionsByUser(UserInfo)

DeleteTabPermissionsByUser deletes a user's Tab Permissions in the Database.

Declaration
public virtual void DeleteTabPermissionsByUser(UserInfo user)
Parameters
Type Name Description
UserInfo user

The user.

| Improve this Doc View Source

GetDesktopModulePermission(Int32)

GetDesktopModulePermission gets a DesktopModule Permission from the Database.

Declaration
public virtual DesktopModulePermissionInfo GetDesktopModulePermission(int desktopModulePermissionId)
Parameters
Type Name Description
System.Int32 desktopModulePermissionId

The ID of the DesktopModule Permission.

Returns
Type Description
DesktopModulePermissionInfo

A DesktopModulePermissionInfo or null.

| Improve this Doc View Source

GetDesktopModulePermissions(Int32)

GetDesktopModulePermissions gets a DesktopModulePermissionCollection.

Declaration
public virtual DesktopModulePermissionCollection GetDesktopModulePermissions(int portalDesktopModuleId)
Parameters
Type Name Description
System.Int32 portalDesktopModuleId

The ID of the DesktopModule.

Returns
Type Description
DesktopModulePermissionCollection

A DesktopModulePermissionCollection with the desktop module permissions, or an empty DesktopModulePermissionCollection if the desktop module wasn't found.

| Improve this Doc View Source

GetFolderPermissionsCollectionByFolder(Int32, String)

Declaration
public virtual FolderPermissionCollection GetFolderPermissionsCollectionByFolder(int portalID, string folder)
Parameters
Type Name Description
System.Int32 portalID
System.String folder
Returns
Type Description
FolderPermissionCollection
| Improve this Doc View Source

GetModulePermissions(Int32, Int32)

GetModulePermissions gets a ModulePermissionCollection.

Declaration
public virtual ModulePermissionCollection GetModulePermissions(int moduleID, int tabID)
Parameters
Type Name Description
System.Int32 moduleID

The ID of the module.

System.Int32 tabID

The ID of the tab.

Returns
Type Description
ModulePermissionCollection

A ModulePermissionCollection with the module permissions, or an empty ModulePermissionCollection if the module wasn't found.

| Improve this Doc View Source

GetPortalPermissions(Int32)

GetPortalPermissions gets a PortalPermissionCollection.

Declaration
public virtual PortalPermissionCollection GetPortalPermissions(int portalId)
Parameters
Type Name Description
System.Int32 portalId

The ID of the portal.

Returns
Type Description
PortalPermissionCollection

A PortalPermissionCollection with the portal permissions, or an empty PortalPermissionCollection if the portal wasn't found.

| Improve this Doc View Source

GetTabPermissions(Int32, Int32)

GetTabPermissions gets a TabPermissionCollection.

Declaration
public virtual TabPermissionCollection GetTabPermissions(int tabId, int portalId)
Parameters
Type Name Description
System.Int32 tabId

The ID of the tab.

System.Int32 portalId

The ID of the portal.

Returns
Type Description
TabPermissionCollection

A TabPermissionCollection instance with the tab's permissions, or an empty TabPermissionCollection if it can't be found.

| Improve this Doc View Source

HasDesktopModulePermission(DesktopModulePermissionCollection, String)

HasDesktopModulePermission checks whether the current user has a specific DesktopModule Permission.

Declaration
public virtual bool HasDesktopModulePermission(DesktopModulePermissionCollection desktopModulePermissions, string permissionKey)
Parameters
Type Name Description
DesktopModulePermissionCollection desktopModulePermissions

The Permissions for the DesktopModule.

System.String permissionKey

The Permission to check.

Returns
Type Description
System.Boolean

true if the current user has the requested permission, otherwise false.

| Improve this Doc View Source

HasFolderPermission(FolderPermissionCollection, String)

Declaration
public virtual bool HasFolderPermission(FolderPermissionCollection objFolderPermissions, string permissionKey)
Parameters
Type Name Description
FolderPermissionCollection objFolderPermissions
System.String permissionKey
Returns
Type Description
System.Boolean
| Improve this Doc View Source

HasModuleAccess(SecurityAccessLevel, String, ModuleInfo)

Determines if user has the necessary permissions to access an item with the designated AccessLevel.

Declaration
public virtual bool HasModuleAccess(SecurityAccessLevel accessLevel, string permissionKey, ModuleInfo moduleConfiguration)
Parameters
Type Name Description
SecurityAccessLevel accessLevel

The SecurityAccessLevel required to access a portal module or module action.

System.String permissionKey

If Security Access is Edit the permissionKey is the actual "edit" permission required.

ModuleInfo moduleConfiguration

The ModuleInfo object for the associated module.

Returns
Type Description
System.Boolean

A boolean value indicating if the user has the necessary permissions.

Remarks

Every module control and module action has an associated permission level. This function determines whether the user represented by UserName has sufficient permissions, as determined by the PortalSettings and ModuleSettings, to access a resource with the designated AccessLevel.

| Improve this Doc View Source

HasModulePermission(ModuleInfo, String)

Declaration
protected bool HasModulePermission(ModuleInfo moduleConfiguration, string permissionKey)
Parameters
Type Name Description
ModuleInfo moduleConfiguration
System.String permissionKey
Returns
Type Description
System.Boolean
| Improve this Doc View Source

HasModulePermission(ModulePermissionCollection, String)

HasModulePermission checks whether the current user has a specific Module Permission.

Declaration
public virtual bool HasModulePermission(ModulePermissionCollection modulePermissions, string permissionKey)
Parameters
Type Name Description
ModulePermissionCollection modulePermissions

The Permissions for the Module.

System.String permissionKey

The Permission to check.

Returns
Type Description
System.Boolean

true if the current user has the requested permission, otherwise false.

| Improve this Doc View Source

HasPortalPermission(PortalPermissionCollection, String)

HasPortalPermission checks whether the current user has a specific Portal Permission.

Declaration
public virtual bool HasPortalPermission(PortalPermissionCollection portalPermissions, string permissionKey)
Parameters
Type Name Description
PortalPermissionCollection portalPermissions

The Permissions for the Portal.

System.String permissionKey

The Permission to check.

Returns
Type Description
System.Boolean

true if the current user has the requested permission, otherwise false.

| Improve this Doc View Source

HasTabPermission(TabPermissionCollection, String)

HasTabPermission checks whether the current user has a specific Tab Permission.

Declaration
public virtual bool HasTabPermission(TabPermissionCollection tabPermissions, string permissionKey)
Parameters
Type Name Description
TabPermissionCollection tabPermissions

The Permissions for the Tab.

System.String permissionKey

The Permission to check.

Returns
Type Description
System.Boolean

true if the current user has the requested permission, otherwise false.

| Improve this Doc View Source

ImplicitRolesForFolders(Int32)

Returns a list with all roles with implicit permissions on Folders.

Declaration
public virtual IEnumerable<RoleInfo> ImplicitRolesForFolders(int portalId)
Parameters
Type Name Description
System.Int32 portalId

The Portal Id where the permissions are.

Returns
Type Description
IEnumerable<RoleInfo>

A List with the implicit roles.

| Improve this Doc View Source

ImplicitRolesForPages(Int32)

Returns a list with all roles with implicit permissions on Tabs.

Declaration
public virtual IEnumerable<RoleInfo> ImplicitRolesForPages(int portalId)
Parameters
Type Name Description
System.Int32 portalId

The Portal Id where the Roles are.

Returns
Type Description
IEnumerable<RoleInfo>

A List with the implicit roles.

| Improve this Doc View Source

Instance()

Declaration
public static PermissionProvider Instance()
Returns
Type Description
PermissionProvider
| Improve this Doc View Source

IsDeniedModulePermission(ModuleInfo, String)

Declaration
protected bool IsDeniedModulePermission(ModuleInfo moduleConfiguration, string permissionKey)
Parameters
Type Name Description
ModuleInfo moduleConfiguration
System.String permissionKey
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsDeniedTabPermission(TabInfo, String)

Declaration
protected bool IsDeniedTabPermission(TabInfo tab, string permissionKey)
Parameters
Type Name Description
TabInfo tab
System.String permissionKey
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsPageAdmin(Int32)

Returns a flag indicating whether the current user is a page admin.

Declaration
public virtual bool IsPageAdmin(int portalId)
Parameters
Type Name Description
System.Int32 portalId

The id of the portal.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

IsPortalEditor()

The portal editor can edit whole site's content, it should be only administrators by default.

Declaration
public virtual bool IsPortalEditor()
Returns
Type Description
System.Boolean

true if the current user is in the administrator role for the current portal, otherwise false.

| Improve this Doc View Source

SaveFolderPermissions(FolderInfo)

SaveFolderPermissions updates a Folder's permissions.

Declaration
public virtual void SaveFolderPermissions(FolderInfo folder)
Parameters
Type Name Description
FolderInfo folder

The Folder to update.

| Improve this Doc View Source

SaveFolderPermissions(IFolderInfo)

SaveFolderPermissions updates a Folder's permissions.

Declaration
public virtual void SaveFolderPermissions(IFolderInfo folder)
Parameters
Type Name Description
IFolderInfo folder

The Folder to update.

| Improve this Doc View Source

SaveModulePermissions(ModuleInfo)

SaveModulePermissions updates a Module's permissions.

Declaration
public virtual void SaveModulePermissions(ModuleInfo module)
Parameters
Type Name Description
ModuleInfo module

The Module to update.

| Improve this Doc View Source

SavePortalPermissions(PortalInfo)

SavePortalPermissions saves a Portal's permissions.

Declaration
public virtual void SavePortalPermissions(PortalInfo portal)
Parameters
Type Name Description
PortalInfo portal

The Portal to update.

| Improve this Doc View Source

SaveTabPermissions(TabInfo)

SaveTabPermissions saves a Tab's permissions.

Declaration
public virtual void SaveTabPermissions(TabInfo tab)
Parameters
Type Name Description
TabInfo tab

The Tab to update.

| Improve this Doc View Source

SupportsFullControl()

Declaration
public virtual bool SupportsFullControl()
Returns
Type Description
System.Boolean

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS