Class TabPermissionController
TabPermissionController provides the Business Layer for Tab Permissions.
Inheritance
Namespace: DotNetNuke.Security.Permissions
Assembly: DotNetNuke.dll
Syntax
public class TabPermissionController : object
Methods
| Improve this Doc View SourceCanAddContentToPage()
Returns a flag indicating whether the current user can add content to the current page.
Declaration
public static bool CanAddContentToPage()
Returns
Type | Description |
---|---|
System.Boolean | A flag indicating whether the user has permission. |
CanAddContentToPage(TabInfo)
Returns a flag indicating whether the current user can add content to a page.
Declaration
public static 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. |
CanAddPage()
Returns a flag indicating whether the current user can add a child page to the current page.
Declaration
public static bool CanAddPage()
Returns
Type | Description |
---|---|
System.Boolean | A flag indicating whether the user has permission. |
CanAddPage(TabInfo)
Returns a flag indicating whether the current user can add a child page to a page.
Declaration
public static 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. |
CanAdminPage()
Returns a flag indicating whether the current user can administer the current page.
Declaration
public static bool CanAdminPage()
Returns
Type | Description |
---|---|
System.Boolean | A flag indicating whether the user has permission. |
CanAdminPage(TabInfo)
Returns a flag indicating whether the current user can administer a page.
Declaration
public static 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. |
CanCopyPage()
Returns a flag indicating whether the current user can copy the current page.
Declaration
public static bool CanCopyPage()
Returns
Type | Description |
---|---|
System.Boolean | A flag indicating whether the user has permission. |
CanCopyPage(TabInfo)
Returns a flag indicating whether the current user can copy a page.
Declaration
public static 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. |
CanDeletePage()
Returns a flag indicating whether the current user can delete the current page.
Declaration
public static bool CanDeletePage()
Returns
Type | Description |
---|---|
System.Boolean | A flag indicating whether the user has permission. |
CanDeletePage(TabInfo)
Returns a flag indicating whether the current user can delete a page.
Declaration
public static 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. |
CanExportPage()
Returns a flag indicating whether the current user can export the current page.
Declaration
public static bool CanExportPage()
Returns
Type | Description |
---|---|
System.Boolean | A flag indicating whether the user has permission. |
CanExportPage(TabInfo)
Returns a flag indicating whether the current user can export a page.
Declaration
public static 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. |
CanImportPage()
Returns a flag indicating whether the current user can import the current page.
Declaration
public static bool CanImportPage()
Returns
Type | Description |
---|---|
System.Boolean | A flag indicating whether the user has permission. |
CanImportPage(TabInfo)
Returns a flag indicating whether the current user can import a page.
Declaration
public static 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. |
CanManagePage()
Returns a flag indicating whether the current user can manage the current page's settings.
Declaration
public static bool CanManagePage()
Returns
Type | Description |
---|---|
System.Boolean | A flag indicating whether the user has permission. |
CanManagePage(TabInfo)
Returns a flag indicating whether the current user can manage a page's settings.
Declaration
public static 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. |
CanNavigateToPage()
Returns a flag indicating whether the current user can see the current page in a navigation object.
Declaration
public static bool CanNavigateToPage()
Returns
Type | Description |
---|---|
System.Boolean | A flag indicating whether the user has permission. |
CanNavigateToPage(TabInfo)
Returns a flag indicating whether the current user can see a page in a navigation object.
Declaration
public static 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. |
CanViewPage()
Returns a flag indicating whether the current user can view the current page.
Declaration
public static bool CanViewPage()
Returns
Type | Description |
---|---|
System.Boolean | A flag indicating whether the user has permission. |
CanViewPage(TabInfo)
Returns a flag indicating whether the current user can view a page.
Declaration
public static 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. |
DeleteTabPermissionsByUser(UserInfo)
DeleteTabPermissionsByUser deletes a user's Tab Permissions in the Database.
Declaration
public static void DeleteTabPermissionsByUser(UserInfo user)
Parameters
Type | Name | Description |
---|---|---|
UserInfo | user | The user. |
GetTabPermissions(Int32, Int32)
GetTabPermissions gets a TabPermissionCollection.
Declaration
public static 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. |
HasTabPermission(TabPermissionCollection, String)
HasTabPermission checks whether the current user has a specific Tab Permission.
Declaration
public static bool HasTabPermission(TabPermissionCollection tabPermissions, string permissionKey)
Parameters
Type | Name | Description |
---|---|---|
TabPermissionCollection | tabPermissions | The Permissions for the Tab. |
System.String | permissionKey | The Permission(s) to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current user has the given permission, otherwise false. |
Remarks
If you pass in a comma delimited list of permissions (eg "ADD,DELETE"), this will return true if the user has any one of the permissions.
HasTabPermission(String)
HasTabPermission checks whether the current user has a specific Tab Permission.
Declaration
public static bool HasTabPermission(string permissionKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | permissionKey | The Permission to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current user has the given permission, otherwise false. |
Remarks
If you pass in a comma delimited list of permissions (eg "ADD,DELETE"), this will return true if the user has any one of the permissions.
ImplicitRoles(Int32)
Returns a list with all roles with implicit permissions on Tabs.
Declaration
public static IEnumerable<RoleInfo> ImplicitRoles(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. |
SaveTabPermissions(TabInfo)
SaveTabPermissions saves a Tab's permissions.
Declaration
public static void SaveTabPermissions(TabInfo tab)
Parameters
Type | Name | Description |
---|---|---|
TabInfo | tab | The Tab to update. |