Class PermissionController
Inheritance
Implements
Namespace: DotNetNuke.Security.Permissions
Assembly: DotNetNuke.dll
Syntax
public class PermissionController : object, IPermissionDefinitionService
Methods
| Improve this Doc View SourceAddPermission(IPermissionDefinitionInfo)
Adds a new permission.
Declaration
public int AddPermission(IPermissionDefinitionInfo permission)
Parameters
Type | Name | Description |
---|---|---|
IPermissionDefinitionInfo | permission |
Returns
Type | Description |
---|---|
System.Int32 | The new permission ID. |
AddPermission(PermissionInfo)
Adds a new permission.
Declaration
public int AddPermission(PermissionInfo permission)
Parameters
Type | Name | Description |
---|---|---|
PermissionInfo | permission |
Returns
Type | Description |
---|---|
System.Int32 | The new permission ID. |
BuildPermissions(IList, String)
Declaration
public static string BuildPermissions(IList permissions, string permissionKey)
Parameters
Type | Name | Description |
---|---|---|
IList | permissions | |
System.String | permissionKey |
Returns
Type | Description |
---|---|
System.String |
DeletePermission(Int32)
Deletes an existing permission.
Declaration
public void DeletePermission(int permissionID)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | permissionID |
GetPermission(Int32)
Gets the permission by the PermissionId.
Declaration
public PermissionInfo GetPermission(int permissionID)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | permissionID |
Returns
Type | Description |
---|---|
PermissionInfo | The permission. |
GetPermissionByCodeAndKey(String, String)
Gets the permissions by PermissionCode and PermissionKey.
Declaration
public ArrayList GetPermissionByCodeAndKey(string permissionCode, string permissionKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | permissionCode | The permission code. |
System.String | permissionKey | The permission key. |
Returns
Type | Description |
---|---|
ArrayList | The permissions by tab. |
GetPermissionsByFolder()
Gets the permissions by folder.
Declaration
public static ArrayList GetPermissionsByFolder()
Returns
Type | Description |
---|---|
ArrayList | The permissions by folder. |
GetPermissionsByModule(Int32, Int32)
Gets the permissions by ModuleDefId and PermissionCode for the given module in the tab.
Declaration
public ArrayList GetPermissionsByModule(int moduleId, int tabId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | moduleId | The module ID. |
System.Int32 | tabId | The tab ID. |
Returns
Type | Description |
---|---|
ArrayList | The permissions by tab. |
GetPermissionsByModuleDefID(Int32)
Gets the permissions by ModuleDefId.
Declaration
public ArrayList GetPermissionsByModuleDefID(int moduleDefID)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | moduleDefID |
Returns
Type | Description |
---|---|
ArrayList | The permissions by tab. |
GetPermissionsByModuleID(Int32)
Declaration
public ArrayList GetPermissionsByModuleID(int moduleId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | moduleId |
Returns
Type | Description |
---|---|
ArrayList |
GetPermissionsByPortalDesktopModule()
Gets the permissions by desktop module.
Declaration
public static ArrayList GetPermissionsByPortalDesktopModule()
Returns
Type | Description |
---|---|
ArrayList | The permissions by desktop module. |
GetPermissionsByTab()
Gets the permissions by tab.
Declaration
public static ArrayList GetPermissionsByTab()
Returns
Type | Description |
---|---|
ArrayList | The permissions by tab. |
RemapPermission<T>(T, Int32)
Declaration
public T RemapPermission<T>(T permission, int portalId)
where T : PermissionInfoBase
Parameters
Type | Name | Description |
---|---|---|
T | permission | |
System.Int32 | portalId |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
UpdatePermission(IPermissionDefinitionInfo)
Updates an existing permission.
Declaration
public void UpdatePermission(IPermissionDefinitionInfo permission)
Parameters
Type | Name | Description |
---|---|---|
IPermissionDefinitionInfo | permission | The permission. |
UpdatePermission(PermissionInfo)
Updates an existing permission.
Declaration
public void UpdatePermission(PermissionInfo permission)
Parameters
Type | Name | Description |
---|---|---|
PermissionInfo | permission |
Explicit Interface Implementations
| Improve this Doc View SourceIPermissionDefinitionService.ClearCache()
Clears the permission definition cache.
Declaration
void IPermissionDefinitionService.ClearCache()
Remarks
AddDefinition(IPermissionDefinitionInfo), UpdateDefinition(IPermissionDefinitionInfo) and DeleteDefinition(IPermissionDefinitionInfo) will clear the cache automatically. This method is only needed if you want to clear the cache manually.
IPermissionDefinitionService.DeleteDefinition(IPermissionDefinitionInfo)
Deletes an existing permission.
Declaration
void IPermissionDefinitionService.DeleteDefinition(IPermissionDefinitionInfo permission)
Parameters
Type | Name | Description |
---|---|---|
IPermissionDefinitionInfo | permission |
IPermissionDefinitionService.UpdateDefinition(IPermissionDefinitionInfo)
Updates an existing permission.
Declaration
void IPermissionDefinitionService.UpdateDefinition(IPermissionDefinitionInfo permission)
Parameters
Type | Name | Description |
---|---|---|
IPermissionDefinitionInfo | permission | The permission. |