Class UserAndGroupTypeService
- Namespace
- Dynamicweb.Security.UserManagement.UserTypes
- Assembly
- Dynamicweb.Core.dll
public sealed class UserAndGroupTypeService
- Inheritance
-
UserAndGroupTypeService
- Inherited Members
Fields
DefaultUserAndGroupTypeName
public const string DefaultUserAndGroupTypeName = "ROOT-AND-DEFAULT"
Field Value
Methods
CheckCanBeChild(UserAndGroupType?, UserAndGroupType?)
Checks the child
is can be descendant of the parent
.
public bool CheckCanBeChild(UserAndGroupType? child, UserAndGroupType? parent)
Parameters
child
UserAndGroupTypeThe parent.
parent
UserAndGroupTypeThe child.
Returns
- bool
True
, if child is can be descendant of the parent, otherwiseFalse
.
ClearCache()
Clears the cache.
public void ClearCache()
Delete(UserAndGroupType)
Deletes the UserAndGroupType.
public void Delete(UserAndGroupType item)
Parameters
item
UserAndGroupTypeThe UserAndGroupType for delete.
Delete(string)
Deletes the UserAndGroupType.
public void Delete(string systemName)
Parameters
systemName
stringThe UserAndGroupType system name.
GetAll()
Gets all UserAndGroupType available in the solution.
public IEnumerable<UserAndGroupType> GetAll()
Returns
- IEnumerable<UserAndGroupType>
The collection of the UserAndGroupType.
GetAllowedChildren(UserAndGroupType?)
Gets the collection of the UserAndGroupType with items which can be a child of the parent
.
public IEnumerable<UserAndGroupType> GetAllowedChildren(UserAndGroupType? parent)
Parameters
parent
UserAndGroupTypeThe parent.
Returns
- IEnumerable<UserAndGroupType>
The collection of the children.
GetAllowedChildren(string?)
Gets the collection of the UserAndGroupType with items which can be a child of the parent.
public IEnumerable<UserAndGroupType> GetAllowedChildren(string? parentSystemName)
Parameters
parentSystemName
stringThe parent system name.
Returns
- IEnumerable<UserAndGroupType>
The collection of the children.
GetBySystemName(string)
Gets the UserAndGroupType by system name.
public UserAndGroupType? GetBySystemName(string systemName)
Parameters
systemName
stringThe system name.
Returns
GetUserAndGroupField(UserAndGroupType, string)
Gets the UserAndGroupField by the system name from UserAndGroupType.
public UserAndGroupField? GetUserAndGroupField(UserAndGroupType item, string fieldSystemName)
Parameters
item
UserAndGroupTypeThe UserAndGroupType.
fieldSystemName
stringThe SystemName.
Returns
IsDefaultChildAllowed(string?)
Checks the regular group or user is can be child.
public bool IsDefaultChildAllowed(string? systemName)
Parameters
systemName
stringThe SystemName.
Returns
- bool
True
, if regular group or user is can be child of the UserAndGroupType, otherwiseFalse
.
IsVisibleOrReadOnlyField(UserAndGroupType, string)
Determines whether the field is not hidden.
public bool IsVisibleOrReadOnlyField(UserAndGroupType item, string fieldSystemName)
Parameters
item
UserAndGroupTypeThe UserAndGroupType.
fieldSystemName
stringThe SystemName.
Returns
- bool
True
, if theitem
have rule for thefieldSystemName
and its rule is not set to Hidden, otherwisefalse
.
Save(UserAndGroupType)
Saves the UserAndGroupType.
public void Save(UserAndGroupType item)
Parameters
item
UserAndGroupTypeThe UserAndGroupType for save.
ValidateSystemName(string)
Checks if the specified system name is unique and have no invalid characters.
public bool ValidateSystemName(string systemName)
Parameters
systemName
stringThe system name.
Returns
- bool
True
, if system name is unique and valid, otherwiseFalse
.