Table of Contents

Class ModulePermissionCollection

Namespace
Dynamicweb.Security.UserManagement
Assembly
Dynamicweb.Security.dll
Represents a collection of modules permissions.
public class ModulePermissionCollection : ICollection<KeyValuePair<string, ModulePermission>>, IEnumerable<KeyValuePair<string, ModulePermission>>, IEnumerable
Inheritance
ModulePermissionCollection
Implements
Inherited Members
Extension Methods

Constructors

ModulePermissionCollection()

public ModulePermissionCollection()

Properties

Count

public int Count { get; }

Property Value

int

Inheritance

public Dictionary<string, InheritanceInfo> Inheritance { get; }

Property Value

Dictionary<string, InheritanceInfo>

IsReadOnly

public bool IsReadOnly { get; }

Property Value

bool

this[string]

Gets or sets module permission for desired module.
public ModulePermission this[string moduleSystemName] { get; set; }

Parameters

moduleSystemName string
Module system name for which module permission should be retrieved/set.

Property Value

ModulePermission
Module permission.

Keys

Gets a collection containing the keys
public ICollection<string> Keys { get; }

Property Value

ICollection<string>

Methods

Add(KeyValuePair<string, ModulePermission>)

public void Add(KeyValuePair<string, ModulePermission> item)

Parameters

item KeyValuePair<string, ModulePermission>

Add(string, ModulePermission)

Adds (or updates) module permission for desired module.
public void Add(string moduleSystemName, ModulePermission permission)

Parameters

moduleSystemName string
Module system name for which module permission should be set.
permission ModulePermission
Module permissions to be set.

Clear()

public void Clear()

Contains(KeyValuePair<string, ModulePermission>)

public bool Contains(KeyValuePair<string, ModulePermission> item)

Parameters

item KeyValuePair<string, ModulePermission>

Returns

bool

CopyTo(KeyValuePair<string, ModulePermission>[], int)

public void CopyTo(KeyValuePair<string, ModulePermission>[] array, int arrayIndex)

Parameters

array KeyValuePair<string, ModulePermission>[]
arrayIndex int

GetEnumerator()

public IEnumerator<KeyValuePair<string, ModulePermission>> GetEnumerator()

Returns

IEnumerator<KeyValuePair<string, ModulePermission>>

GetModulePermissionsWithInheritance(GroupCollection)

Gets module permissions respecting inheritance
public ModulePermissionCollection GetModulePermissionsWithInheritance(GroupCollection parents)

Parameters

parents GroupCollection
GroupCollection

Returns

ModulePermissionCollection
ModulePermissionCollection

LoadFromXml(string)

Loads modules permissions from xml string.
public void LoadFromXml(string xml)

Parameters

xml string
Xml string to load modules permissions from.

Remove(KeyValuePair<string, ModulePermission>)

public bool Remove(KeyValuePair<string, ModulePermission> item)

Parameters

item KeyValuePair<string, ModulePermission>

Returns

bool

ToString()

Retrieves modules permissions as xml string.
public override string ToString()

Returns

string
To top