Class UserAndGroupTypeService
- Namespace
- Dynamicweb.Security.UserManagement.UserTypes
- Assembly
- Dynamicweb.Security.dll
public class UserAndGroupTypeService
- Inheritance
-
UserAndGroupTypeService
- Inherited Members
Fields
DefaultUserAndGroupTypeName
public const string DefaultUserAndGroupTypeName = "ROOT-AND-DEFAULT"
Field Value
StandardFields
public static readonly Dictionary<UserDataBaseField, string> StandardFields
Field Value
Methods
CheckCanBeChild(UserAndGroupType, UserAndGroupType)
Checks the
child is can be descendant of the parent.public static bool CheckCanBeChild(UserAndGroupType child, UserAndGroupType parent)
Parameters
childUserAndGroupType- The parent.
parentUserAndGroupType- The child.
Returns
- bool
True, if child is can be descendant of the parent, otherwiseFalse.
ClearCache()
Clears the cache.
public static void ClearCache()
Delete(UserAndGroupType)
Deletes the UserAndGroupType.
public static void Delete(UserAndGroupType item)
Parameters
itemUserAndGroupType- The UserAndGroupType for delete.
Delete(string)
Deletes the UserAndGroupType.
public static void Delete(string systemName)
Parameters
systemNamestring- The UserAndGroupType system name.
GetAll()
Gets all UserAndGroupType available in the solution.
public static 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 static IEnumerable<UserAndGroupType> GetAllowedChildren(UserAndGroupType parent)
Parameters
parentUserAndGroupType- The 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 static IEnumerable<UserAndGroupType> GetAllowedChildren(string parentSystemName)
Parameters
parentSystemNamestring- The parent system name.
Returns
- IEnumerable<UserAndGroupType>
- The collection of the children.
GetBySystemName(string)
Gets the UserAndGroupType by system name.
public static UserAndGroupType GetBySystemName(string systemName)
Parameters
systemNamestring- The system name.
Returns
GetUserAndGroupField(UserAndGroupType, UserDataBaseField)
public static UserAndGroupField GetUserAndGroupField(UserAndGroupType item, UserDataBaseField dbField)
Parameters
itemUserAndGroupType- The UserAndGroupType.
dbFieldUserDataBaseField- The UserDataBaseField.
Returns
GetUserAndGroupField(UserAndGroupType, string)
Gets the UserAndGroupField by the system name from UserAndGroupType.
public static UserAndGroupField GetUserAndGroupField(UserAndGroupType item, string fieldSystemName)
Parameters
itemUserAndGroupType- The UserAndGroupType.
fieldSystemNamestring- The SystemName.
Returns
HaveVisibleOrReadOnlyFields(UserAndGroupType, IEnumerable<UserDataBaseField>)
Determines whether at least one of the
dbFields is not hidden.public static bool HaveVisibleOrReadOnlyFields(UserAndGroupType item, IEnumerable<UserDataBaseField> dbFields)
Parameters
itemUserAndGroupType- The UserAndGroupType.
dbFieldsIEnumerable<UserDataBaseField>- The collection of the UserDataBaseField.
Returns
- bool
True, if theitemhave rule for at least one of thedbFieldsand its rule is not set to Hidden, otherwisefalse.
IsDefaultChildAllowed(string)
Checks the regular group or user is can be child.
public static bool IsDefaultChildAllowed(string systemName)
Parameters
systemNamestring- The SystemName.
Returns
- bool
True, if regular group or user is can be child of the UserAndGroupType, otherwiseFalse.
IsVisibleOrReadOnlyField(UserAndGroupType, UserDataBaseField)
Determines whether the field is not hidden.
public static bool IsVisibleOrReadOnlyField(UserAndGroupType item, UserDataBaseField dbField)
Parameters
itemUserAndGroupType- The UserAndGroupType.
dbFieldUserDataBaseField- The UserDataBaseField.
Returns
- bool
True, if theitemhave rule for thedbFieldand its rule is not set to Hidden, otherwisefalse.
IsVisibleOrReadOnlyField(UserAndGroupType, string)
Determines whether the field is not hidden.
public static bool IsVisibleOrReadOnlyField(UserAndGroupType item, string fieldSystemName)
Parameters
itemUserAndGroupType- The UserAndGroupType.
fieldSystemNamestring- The SystemName.
Returns
- bool
True, if theitemhave rule for thefieldSystemNameand its rule is not set to Hidden, otherwisefalse.
Save(UserAndGroupType)
Saves the UserAndGroupType.
public static void Save(UserAndGroupType item)
Parameters
itemUserAndGroupType- The UserAndGroupType for save.
ValidateSystemName(string)
Checks if the specified system name is unique and have no invalid characters.
public static bool ValidateSystemName(string systemName)
Parameters
systemNamestring- The system name.
Returns
- bool
True, if system name is unique and valid, otherwiseFalse.