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

Class PermissionsGrid

Inheritance
System.Object
PermissionsGrid
DesktopModulePermissionsGrid
FolderPermissionsGrid
ModulePermissionsGrid
TabPermissionsGrid
Implements
INamingContainer
Namespace: DotNetNuke.Security.Permissions.Controls
Assembly: DotNetNuke.dll
Syntax
public abstract class PermissionsGrid : Control

Constructors

| Improve this Doc View Source

PermissionsGrid()

Initializes a new instance of the PermissionsGrid class.

Declaration
public PermissionsGrid()

Fields

| Improve this Doc View Source

PermissionTypeDeny

Declaration
protected const string PermissionTypeDeny = null
Field Value
Type Description
System.String
| Improve this Doc View Source

PermissionTypeGrant

Declaration
protected const string PermissionTypeGrant = null
Field Value
Type Description
System.String
| Improve this Doc View Source

PermissionTypeNull

Declaration
protected const string PermissionTypeNull = null
Field Value
Type Description
System.String
| Improve this Doc View Source

rolePermissionsGrid

Declaration
protected DataGrid rolePermissionsGrid
Field Value
Type Description
DataGrid
| Improve this Doc View Source

userPermissionsGrid

Declaration
protected DataGrid userPermissionsGrid
Field Value
Type Description
DataGrid

Properties

| Improve this Doc View Source

AdministratorRoleId

Gets the Id of the Administrator Role.

Declaration
public int AdministratorRoleId { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

AlternatingItemStyle

Declaration
public TableItemStyle AlternatingItemStyle { get; }
Property Value
Type Description
TableItemStyle
| Improve this Doc View Source

AutoGenerateColumns

Declaration
public bool AutoGenerateColumns { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

CellSpacing

Declaration
public int CellSpacing { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Columns

Declaration
public DataGridColumnCollection Columns { get; }
Property Value
Type Description
DataGridColumnCollection
| Improve this Doc View Source

dtRolePermissions

Gets the underlying Permissions Data Table.

Declaration
public DataTable dtRolePermissions { get; }
Property Value
Type Description
DataTable
| Improve this Doc View Source

dtUserPermissions

Gets the underlying Permissions Data Table.

Declaration
public DataTable dtUserPermissions { get; }
Property Value
Type Description
DataTable
| Improve this Doc View Source

DynamicColumnAdded

Gets or sets a value indicating whether a Dynamic Column has been added.

Declaration
public bool DynamicColumnAdded { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

FooterStyle

Declaration
public TableItemStyle FooterStyle { get; }
Property Value
Type Description
TableItemStyle
| Improve this Doc View Source

GridLines

Declaration
public GridLines GridLines { get; set; }
Property Value
Type Description
GridLines
| Improve this Doc View Source

HeaderStyle

Declaration
public TableItemStyle HeaderStyle { get; }
Property Value
Type Description
TableItemStyle
| Improve this Doc View Source

Items

Declaration
public DataGridItemCollection Items { get; }
Property Value
Type Description
DataGridItemCollection
| Improve this Doc View Source

ItemStyle

Declaration
public TableItemStyle ItemStyle { get; }
Property Value
Type Description
TableItemStyle
| Improve this Doc View Source

PermissionsList

Declaration
protected virtual List<PermissionInfoBase> PermissionsList { get; }
Property Value
Type Description
List<PermissionInfoBase>
| Improve this Doc View Source

PortalId

Gets the Id of the Portal.

Declaration
public int PortalId { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

RefreshGrid

Declaration
protected virtual bool RefreshGrid { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

RegisteredUsersRoleId

Gets the Id of the Registered Users Role.

Declaration
public int RegisteredUsersRoleId { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

ResourceFile

Gets or sets the ResourceFile to localize permissions.

Declaration
public string ResourceFile { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Roles

Gets or sets the collection of Roles to display.

Declaration
public ArrayList Roles { get; set; }
Property Value
Type Description
ArrayList
| Improve this Doc View Source

SelectedItemStyle

Declaration
public TableItemStyle SelectedItemStyle { get; }
Property Value
Type Description
TableItemStyle

Methods

| Improve this Doc View Source

AddPermission(ArrayList, UserInfo)

Updates a Permission.

Declaration
protected virtual void AddPermission(ArrayList permissions, UserInfo user)
Parameters
Type Name Description
ArrayList permissions

The permissions collection.

UserInfo user

The user to add.

| Improve this Doc View Source

AddPermission(ArrayList, RoleInfo)

Updates a Permission.

Declaration
protected virtual void AddPermission(ArrayList permissions, RoleInfo role)
Parameters
Type Name Description
ArrayList permissions

The permissions collection.

RoleInfo role

The role to add.

| Improve this Doc View Source

AddPermission(PermissionInfo, Int32, String, Int32, String, Boolean)

Declaration
protected virtual void AddPermission(PermissionInfo permission, int roleId, string roleName, int userId, string displayName, bool allowAccess)
Parameters
Type Name Description
PermissionInfo permission
System.Int32 roleId
System.String roleName
System.Int32 userId
System.String displayName
System.Boolean allowAccess
| Improve this Doc View Source

AddUser(Object, EventArgs)

AddUser runs when the Add user linkbutton is clicked.

Declaration
protected virtual void AddUser(object sender, EventArgs e)
Parameters
Type Name Description
System.Object sender
EventArgs e
| Improve this Doc View Source

BuildKey(Boolean, Int32, Int32, Int32, String, Int32, String)

Builds the key used to store the "permission" information in the ViewState.

Declaration
protected string BuildKey(bool allowAccess, int permissionId, int objectPermissionId, int roleId, string roleName, int userID, string displayName)
Parameters
Type Name Description
System.Boolean allowAccess

The type of permission ( grant / deny ).

System.Int32 permissionId

The Id of the permission.

System.Int32 objectPermissionId

The Id of the object permission.

System.Int32 roleId

The role id.

System.String roleName

The role name.

System.Int32 userID

The user id.

System.String displayName

The user display name.

Returns
Type Description
System.String

The permission state key.

| Improve this Doc View Source

BuildKey(Boolean, Int32, Int32, Int32, String)

Builds the key used to store the "permission" information in the ViewState.

Declaration
protected string BuildKey(bool allowAccess, int permissionId, int objectPermissionId, int roleId, string roleName)
Parameters
Type Name Description
System.Boolean allowAccess

The type of permission ( grant / deny ).

System.Int32 permissionId

The Id of the permission.

System.Int32 objectPermissionId

The Id of the object permission.

System.Int32 roleId

The role id.

System.String roleName

The role name.

Returns
Type Description
System.String

The permission state key.

| Improve this Doc View Source

CreateChildControls()

Declaration
protected override void CreateChildControls()
| Improve this Doc View Source

GenerateDataGrid()

Generate the Data Grid.

Declaration
public abstract void GenerateDataGrid()
| Improve this Doc View Source

GetEnabled(PermissionInfo, UserInfo, Int32)

Gets the Enabled status of the permission.

Declaration
protected virtual bool GetEnabled(PermissionInfo objPerm, UserInfo user, int column)
Parameters
Type Name Description
PermissionInfo objPerm

The permission being loaded.

UserInfo user

The user.

System.Int32 column

The column of the Grid.

Returns
Type Description
System.Boolean

true if the permission is enabled, otherwise false.

| Improve this Doc View Source

GetEnabled(PermissionInfo, RoleInfo, Int32)

Gets the Enabled status of the permission.

Declaration
protected virtual bool GetEnabled(PermissionInfo objPerm, RoleInfo role, int column)
Parameters
Type Name Description
PermissionInfo objPerm

The permission being loaded.

RoleInfo role

The role.

System.Int32 column

The column of the Grid.

Returns
Type Description
System.Boolean

true if the permission is enabled, otherwise false.

| Improve this Doc View Source

GetPermission(PermissionInfo, UserInfo, Int32, String)

Gets the Value of the permission.

Declaration
protected virtual string GetPermission(PermissionInfo objPerm, UserInfo user, int column, string defaultState)
Parameters
Type Name Description
PermissionInfo objPerm

The permission being loaded.

UserInfo user

The user.

System.Int32 column

The column of the Grid.

System.String defaultState

Default State.

Returns
Type Description
System.String

The permission state (one of PermissionTypeGrant, PermissionTypeDeny or defaultState).

| Improve this Doc View Source

GetPermission(PermissionInfo, UserInfo, Int32)

Gets the Value of the permission.

Declaration
protected virtual bool GetPermission(PermissionInfo objPerm, UserInfo user, int column)
Parameters
Type Name Description
PermissionInfo objPerm

The permission being loaded.

UserInfo user

The user.

System.Int32 column

The column of the Grid.

Returns
Type Description
System.Boolean

true if the permission is granted, otherwise false.

| Improve this Doc View Source

GetPermission(PermissionInfo, RoleInfo, Int32, String)

Gets the Value of the permission.

Declaration
protected virtual string GetPermission(PermissionInfo objPerm, RoleInfo role, int column, string defaultState)
Parameters
Type Name Description
PermissionInfo objPerm

The permission being loaded.

RoleInfo role

The role.

System.Int32 column

The column of the Grid.

System.String defaultState

Default State.

Returns
Type Description
System.String

The permission state (one of PermissionTypeGrant, PermissionTypeDeny or defaultState).

| Improve this Doc View Source

GetPermission(PermissionInfo, RoleInfo, Int32)

Gets the Value of the permission.

Declaration
protected virtual bool GetPermission(PermissionInfo objPerm, RoleInfo role, int column)
Parameters
Type Name Description
PermissionInfo objPerm

The permission being loaded.

RoleInfo role

The role.

System.Int32 column

The column of the Grid.

Returns
Type Description
System.Boolean

true if the permission is granted, otherwise false.

| Improve this Doc View Source

GetPermissions()

Gets the permissions from the Database.

Declaration
protected virtual ArrayList GetPermissions()
Returns
Type Description
ArrayList

An of PermissionInfo instances.

| Improve this Doc View Source

GetUsers()

Gets the users from the Database.

Declaration
protected virtual ArrayList GetUsers()
Returns
Type Description
ArrayList

An of UserInfo instances.

| Improve this Doc View Source

IsFullControl(PermissionInfo)

Declaration
protected virtual bool IsFullControl(PermissionInfo permissionInfo)
Parameters
Type Name Description
PermissionInfo permissionInfo
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsViewPermisison(PermissionInfo)

Declaration
protected virtual bool IsViewPermisison(PermissionInfo permissionInfo)
Parameters
Type Name Description
PermissionInfo permissionInfo
Returns
Type Description
System.Boolean
| Improve this Doc View Source

OnInit(EventArgs)

Declaration
protected override void OnInit(EventArgs e)
Parameters
Type Name Description
EventArgs e
| Improve this Doc View Source

OnPreRender(EventArgs)

Overrides the base OnPreRender method to Bind the Grid to the Permissions.

Declaration
protected override void OnPreRender(EventArgs e)
Parameters
Type Name Description
EventArgs e
| Improve this Doc View Source

ParsePermissionKeys(PermissionInfoBase, String[])

Declaration
protected virtual void ParsePermissionKeys(PermissionInfoBase permission, string[] settings)
Parameters
Type Name Description
PermissionInfoBase permission
System.String[] settings
| Improve this Doc View Source

RegisterScriptsForAjaxPanel()

Registers the scripts necessary to make the tri-state controls work inside a RadAjaxPanel.

Declaration
public void RegisterScriptsForAjaxPanel()
Remarks

No need to call this unless using the PermissionGrid inside an ajax control that omits scripts on postback See DesktopModules/Admin/Tabs.ascx.cs for an example of usage.

| Improve this Doc View Source

RemovePermission(Int32, Int32, Int32)

Declaration
protected virtual void RemovePermission(int permissionID, int roleID, int userID)
Parameters
Type Name Description
System.Int32 permissionID
System.Int32 roleID
System.Int32 userID
| Improve this Doc View Source

RoleGroupsSelectedIndexChanged(Object, EventArgs)

RoleGroupsSelectedIndexChanged runs when the Role Group is changed.

Declaration
protected virtual void RoleGroupsSelectedIndexChanged(object sender, EventArgs e)
Parameters
Type Name Description
System.Object sender
EventArgs e
| Improve this Doc View Source

SupportsDenyPermissions(PermissionInfo)

Declaration
protected virtual bool SupportsDenyPermissions(PermissionInfo permissionInfo)
Parameters
Type Name Description
PermissionInfo permissionInfo
Returns
Type Description
System.Boolean
| Improve this Doc View Source

UpdatePermission(PermissionInfo, Int32, String, Boolean)

Updates a Permission.

Declaration
protected virtual void UpdatePermission(PermissionInfo permission, int roleId, string roleName, bool allowAccess)
Parameters
Type Name Description
PermissionInfo permission

The permission being updated.

System.Int32 roleId

Role Id.

System.String roleName

The name of the role.

System.Boolean allowAccess

The value of the permission.

| Improve this Doc View Source

UpdatePermission(PermissionInfo, Int32, String, String)

Updates a Permission.

Declaration
protected virtual void UpdatePermission(PermissionInfo permission, int roleId, string roleName, string stateKey)
Parameters
Type Name Description
PermissionInfo permission

The permission being updated.

System.Int32 roleId

Role Id.

System.String roleName

The name of the role.

System.String stateKey

The permission state.

| Improve this Doc View Source

UpdatePermission(PermissionInfo, String, Int32, Boolean)

Updates a Permission.

Declaration
protected virtual void UpdatePermission(PermissionInfo permission, string displayName, int userId, bool allowAccess)
Parameters
Type Name Description
PermissionInfo permission

The permission being updated.

System.String displayName

The user's display name.

System.Int32 userId

The user's id.

System.Boolean allowAccess

The value of the permission.

| Improve this Doc View Source

UpdatePermission(PermissionInfo, String, Int32, String)

Updates a Permission.

Declaration
protected virtual void UpdatePermission(PermissionInfo permission, string displayName, int userId, string stateKey)
Parameters
Type Name Description
PermissionInfo permission

The permission being updated.

System.String displayName

The user's display name.

System.Int32 userId

The user's id.

System.String stateKey

The permission state.

| Improve this Doc View Source

UpdatePermissions()

Updates the permissions.

Declaration
protected void UpdatePermissions()
| Improve this Doc View Source

UpdateRolePermissions()

Updates the permissions.

Declaration
protected void UpdateRolePermissions()
| Improve this Doc View Source

UpdateUserPermissions()

Updates the permissions.

Declaration
protected void UpdateUserPermissions()

Implements

INamingContainer

Extension Methods

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