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

Class PortalPermissionController

PortalPermissionController provides the Business Layer for Portal Permissions.

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

Methods

| Improve this Doc View Source

CanAddTopLevel()

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

Declaration
public static bool CanAddTopLevel()
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 on a portal.

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

The portal id.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanAdminPages()

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

Declaration
public static bool CanAdminPages()
Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

CanAdminPages(Int32)

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

Declaration
public static bool CanAdminPages(int portalId)
Parameters
Type Name Description
System.Int32 portalId

The portal id.

Returns
Type Description
System.Boolean

A flag indicating whether the user has permission.

| Improve this Doc View Source

DeletePortalPermissionsByUser(UserInfo)

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

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

The user.

| Improve this Doc View Source

GetPortalPermissions(Int32)

GetPortalPermissions gets a PortalPermissionCollection.

Declaration
public static 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

HasPortalPermission(PortalPermissionCollection, String)

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

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

The Permissions for the Portal.

System.String permissionKey

The Permission(s) to check.

Returns
Type Description
System.Boolean

true if the current user has the requested 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.

| Improve this Doc View Source

HasPortalPermission(String)

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

Declaration
public static bool HasPortalPermission(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 requested 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.

| Improve this Doc View Source

SavePortalPermissions(PortalInfo)

SavePortalPermissions saves a Portal's permissions.

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

The Portal to update.

Extension Methods

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