Interface IPermissionDefinitionService
Handles the Business Control Layer for Permissions.
Namespace: DotNetNuke.Abstractions.Security.Permissions
Assembly: DotNetNuke.Abstractions.dll
Syntax
public interface IPermissionDefinitionService
Methods
| Improve this Doc View SourceAddDefinition(IPermissionDefinitionInfo)
Adds a new permission.
Declaration
int AddDefinition(IPermissionDefinitionInfo permissionDefinition)
Parameters
Type | Name | Description |
---|---|---|
IPermissionDefinitionInfo | permissionDefinition | The permission. |
Returns
Type | Description |
---|---|
System.Int32 | The new permission ID. |
ClearCache()
Clears the permission definition cache.
Declaration
void 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.
DeleteDefinition(IPermissionDefinitionInfo)
Deletes an existing permission.
Declaration
void DeleteDefinition(IPermissionDefinitionInfo permissionDefinition)
Parameters
Type | Name | Description |
---|---|---|
IPermissionDefinitionInfo | permissionDefinition | The permission to delete. |
GetDefinition(Int32)
Gets the permission by the PermissionId.
Declaration
IPermissionDefinitionInfo GetDefinition(int permissionDefinitionId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | permissionDefinitionId | The permission ID. |
Returns
Type | Description |
---|---|
IPermissionDefinitionInfo | The permission. |
GetDefinitions()
Gets the permissions.
Declaration
IEnumerable<IPermissionDefinitionInfo> GetDefinitions()
Returns
Type | Description |
---|---|
IEnumerable<IPermissionDefinitionInfo> | The permissions. |
GetDefinitionsByCodeAndKey(String, String)
Gets the permissions by PermissionCode and PermissionKey.
Declaration
IEnumerable<IPermissionDefinitionInfo> GetDefinitionsByCodeAndKey(string permissionCode, string permissionKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | permissionCode | The permission code. |
System.String | permissionKey | The permission key. |
Returns
Type | Description |
---|---|
IEnumerable<IPermissionDefinitionInfo> | The permissions by tab. |
GetDefinitionsByFolder()
Gets the permissions by folder.
Declaration
IEnumerable<IPermissionDefinitionInfo> GetDefinitionsByFolder()
Returns
Type | Description |
---|---|
IEnumerable<IPermissionDefinitionInfo> | The permissions by folder. |
GetDefinitionsByModule(Int32, Int32)
Gets the permissions by ModuleDefId and PermissionCode for the given module in the tab.
Declaration
IEnumerable<IPermissionDefinitionInfo> GetDefinitionsByModule(int moduleId, int tabId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | moduleId | The module ID. |
System.Int32 | tabId | The tab ID. |
Returns
Type | Description |
---|---|
IEnumerable<IPermissionDefinitionInfo> | The permissions by tab. |
GetDefinitionsByModuleDefId(Int32)
Gets the permissions by ModuleDefId.
Declaration
IEnumerable<IPermissionDefinitionInfo> GetDefinitionsByModuleDefId(int moduleDefId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | moduleDefId | The module definition ID. |
Returns
Type | Description |
---|---|
IEnumerable<IPermissionDefinitionInfo> | The permissions by tab. |
GetDefinitionsByPortalDesktopModule()
Gets the permissions by desktop module.
Declaration
IEnumerable<IPermissionDefinitionInfo> GetDefinitionsByPortalDesktopModule()
Returns
Type | Description |
---|---|
IEnumerable<IPermissionDefinitionInfo> | The permissions by desktop module. |
GetDefinitionsByTab()
Gets the permissions by tab.
Declaration
IEnumerable<IPermissionDefinitionInfo> GetDefinitionsByTab()
Returns
Type | Description |
---|---|
IEnumerable<IPermissionDefinitionInfo> | The permissions by tab. |
UpdateDefinition(IPermissionDefinitionInfo)
Updates an existing permission.
Declaration
void UpdateDefinition(IPermissionDefinitionInfo permission)
Parameters
Type | Name | Description |
---|---|---|
IPermissionDefinitionInfo | permission | The permission. |