Determines if user has the necessary permissions to access an item with the
designated AccessLevel.
Namespace: DotNetNuke.Security.PermissionsAssembly: DotNetNuke (in DotNetNuke.dll)
Syntax
C# |
---|
public virtual bool HasModuleAccess( SecurityAccessLevel accessLevel, string permissionKey, ModuleInfo moduleConfiguration ) |
Visual Basic |
---|
Public Overridable Function HasModuleAccess ( accessLevel As SecurityAccessLevel, permissionKey As String, moduleConfiguration As ModuleInfo ) As Boolean |
Parameters
- accessLevel
- Type: DotNetNuke.Security..::..SecurityAccessLevel
The SecurityAccessLevel required to access a portal module or module action.
- permissionKey
- Type: System..::..String
If Security Access is Edit the permissionKey is the actual "edit" permisison required.
- moduleConfiguration
- Type: DotNetNuke.Entities.Modules..::..ModuleInfo
The ModuleInfo object for the associated module.
Return Value
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.