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
Inheritance
public Dictionary<string, InheritanceInfo> Inheritance { get; }
Property Value
IsReadOnly
public bool IsReadOnly { get; }
Property Value
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
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
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
GetModulePermissionsWithInheritance(GroupCollection)
Gets module permissions respecting inheritance
public ModulePermissionCollection GetModulePermissionsWithInheritance(GroupCollection parents)
Parameters
parents
GroupCollection- GroupCollection
Returns
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
ToString()
Retrieves modules permissions as xml string.
public override string ToString()