Table of Contents

Class Group

Namespace
Dynamicweb.Security.UserManagement
Assembly
Dynamicweb.Security.dll
Represents a user group.
[Serializable]
public class Group : DbObject, IPermissionLookup, IPermissionControlled
Inheritance
Group
Implements
Inherited Members
Extension Methods

Constructors

Group()

Creates a new instance of a class.
public Group()

Group(string)

Creates a new instance of a class.
public Group(string groupName)

Parameters

groupName string
Initial name to be assigned to the group.

Properties

Address

Gets or sets group's address.
[AddInName("Address")]
public string Address { get; set; }

Property Value

string
Group's address.

Address2

Gets or sets group's secondary address.
[AddInName("Address2")]
public string Address2 { get; set; }

Property Value

string
Group's secondary address.

Administrators

Gets the administration collection of current group.
public ReadOnlyUserCollection Administrators { get; }

Property Value

ReadOnlyUserCollection

AllGroups

Gets all groups
public static Dictionary<int, Group> AllGroups { get; }

Property Value

Dictionary<int, Group>
Dictionary<TKey, TValue>

AllowBackend

public bool AllowBackend { get; set; }

Property Value

bool

AllowBackendWithInheritance

Gets AllowBackendWithInheritance setting value
[AddInName("AllowBackend")]
public bool AllowBackendWithInheritance { get; }

Property Value

bool
True or false

Cellular

Gets or sets group's cellular.
[AddInName("Cellular")]
public string Cellular { get; set; }

Property Value

string
Group's cellular.

City

Gets or sets group's city.
[AddInName("City")]
public string City { get; set; }

Property Value

string
Group's city.

CompanyName

Gets or sets group's company name.
[AddInName("CompanyName")]
public string CompanyName { get; set; }

Property Value

string
Group's company name.

ConfigurationID

Gets or sets group's editor configuration ID.
[AddInName("ConfigurationID")]
public int ConfigurationID { get; set; }

Property Value

int
Group's editor configuration ID.

Country

Gets or sets group's country.
[AddInName("Country")]
public string Country { get; set; }

Property Value

string
Group's country.

CustomerNumber

Gets or sets group's customer number.
[AddInName("CustomerNumber")]
public string CustomerNumber { get; set; }

Property Value

string
Group's customer number.

CustomFieldValues

Gets or sets custom field values
public CustomFieldValueCollection CustomFieldValues { get; set; }

Property Value

CustomFieldValueCollection
CustomFieldValueCollection

DefaultPermission

The default permission this group grants to all it's users.
public PermissionLevel? DefaultPermission { get; set; }

Property Value

PermissionLevel?
defaultPermission

EmailAllowed

Gets or sets EmailAllowed
public bool EmailAllowed { get; set; }

Property Value

bool
String value

FrontendStartPage

Gets or sets frontend start page
public string FrontendStartPage { get; set; }

Property Value

string
String value

GeoLocationHash

Gets or sets GeoLocationHash
[Obsolete("Use GeolocationHashCode instead")]
public string GeoLocationHash { get; set; }

Property Value

string
String value

GeolocationHashCode

Gets or sets GeolocationHashCode
public string GeolocationHashCode { get; set; }

Property Value

string
String value

GeolocationIcon

Gets or sets GeoLocationImage
public string GeolocationIcon { get; set; }

Property Value

string
String value

GeoLocationImage

Gets or sets GeoLocationImage
[Obsolete("Use GeolocationIcon instead")]
public string GeoLocationImage { get; set; }

Property Value

string
String value

GeoLocationIsCustom

Gets or sets GeoLocationIsCustom setting value
[Obsolete("Use IsGeolocationCustom instead.")]
public bool GeoLocationIsCustom { get; set; }

Property Value

bool
Double value

GeoLocationLat

[Obsolete("Use GeolocationLatitude instead.")]
public double GeoLocationLat { get; set; }

Property Value

double

GeolocationLatitude

Gets geo location latitude
public double GeolocationLatitude { get; set; }

Property Value

double
Double value

GeoLocationLng

[Obsolete("Use GeoLocationLongitude instead.")]
public double GeoLocationLng { get; set; }

Property Value

double

GeolocationLongitude

Gets geo location longitude
public double GeolocationLongitude { get; set; }

Property Value

double
Double value

ID

Gets or sets the ID of this Group
[AddInName("ID")]
public int ID { get; set; }

Property Value

int

IsGeolocationCustom

Gets or sets GeoLocationIsCustom setting value
public bool IsGeolocationCustom { get; set; }

Property Value

bool
Double value

ItemId

Gets or sets the Id of the associated content item.
public string ItemId { get; set; }

Property Value

string

ItemType

Gets or sets the type of the associated item.
public string ItemType { get; set; }

Property Value

string

JobTitle

Gets or sets group's job title.
[AddInName("JobTitle")]
public string JobTitle { get; set; }

Property Value

string
Group's job title.

Modules

Gets or sets module permissions for current group.
public ModulePermissionCollection Modules { get; set; }

Property Value

ModulePermissionCollection
Module permissions for current user.

ModulesWithInheritance

Gets the module permissions with inheritance from this groups's parent
public ModulePermissionCollection ModulesWithInheritance { get; }

Property Value

ModulePermissionCollection

Name

Gets or sets group's name.
[AddInName("Name")]
public string Name { get; set; }

Property Value

string
Group's name.

Parent

Gets or sets parent group for current group.
public Group Parent { get; set; }

Property Value

Group
Parent group for current group.

ParentID

Gets or sets parent group ID for current group.
[AddInName("ParentID")]
public int ParentID { get; set; }

Property Value

int
Parent group ID for current group.

RelatedSmartSearchID

Gets or sets group's related smart search id
public string RelatedSmartSearchID { get; set; }

Property Value

string
Related smart search id

SmartSearchCacheLastRecalculation

Gets or sets last group's smart search cache recalculation time
[Obsolete("Use SmartSearchLastCalculatedTime instead.")]
public DateTime SmartSearchCacheLastRecalculation { get; set; }

Property Value

DateTime

Remarks

Caching last recalculation time.

SmartSearchLastCalculatedTime

Gets or sets the last time the smart search was calculated and user relations was updated.
public DateTime SmartSearchLastCalculatedTime { get; set; }

Property Value

DateTime

State

Gets or sets group's state.
[AddInName("State")]
public string State { get; set; }

Property Value

string
Group's state.

Subgroups

Gets a collection of child groups for current group. The collection is read-only.
public ReadOnlyGroupCollection Subgroups { get; }

Property Value

ReadOnlyGroupCollection
A collection of child groups for current group. The collection is read-only.

Telefax

Gets or sets group's telefax.
[AddInName("Telefax")]
public string Telefax { get; set; }

Property Value

string
Group's telefax.

Telephone

Gets or sets group's telephone.
[AddInName("Telephone")]
public string Telephone { get; set; }

Property Value

string
Group's telephone.

TelephoneHome

Gets or sets group's home telephone.
[AddInName("TelephoneHome")]
public string TelephoneHome { get; set; }

Property Value

string
Group's home telephone.

TreeSection

Gets or sets group's tree section.
[AddInName("TreeSection")]
public string TreeSection { get; set; }

Property Value

string
Group's tree section.

UserAndGroupType

public UserAndGroupType UserAndGroupType { get; }

Property Value

UserAndGroupType

UserAndGroupTypeSystemName

Gets or sets the SystemName.
public string UserAndGroupTypeSystemName { get; set; }

Property Value

string

UserDefaultItemType

Gets or sets the type of the associated item for new user.
public string UserDefaultItemType { get; set; }

Property Value

string

UserLoaded

Shows if user logged in
public bool UserLoaded { get; }

Property Value

bool
True or false value

Users

Gets a collection of user which belongs to current group. The collection is read-only.
public ReadOnlyUserCollection Users { get; }

Property Value

ReadOnlyUserCollection
A collection of user which belongs to current group. The collection is read-only.

ValidFrom

Gets or sets group's validity starting date.
[AddInName("ValidFrom")]
public DateTime ValidFrom { get; set; }

Property Value

DateTime
Group's validity starting date.

ValidTo

Gets or sets group's validity ending date.
[AddInName("ValidTo")]
public DateTime ValidTo { get; set; }

Property Value

DateTime
Group's validity ending date.

ZipCode

Gets or sets group's zip code.
[AddInName("ZipCode")]
public string ZipCode { get; set; }

Property Value

string
Group's zip code.

Methods

AddAdministrator(int)

Adds specified user to current group administrator collection.
public void AddAdministrator(int userID)

Parameters

userID int
The ID of the user to be added.

AddUser(int)

Adds specified user to current group.
public void AddUser(int userID)

Parameters

userID int
The ID of the user to be added.

ClearCache()

Clears cache
public static void ClearCache()

ClearSmartSearchCache()

Clears smart search cache
[Obsolete("Smart search caching has been removed. Calling this function has no effect.")]
public void ClearSmartSearchCache()

Delete()

Deletes a group.
public void Delete()

Delete(bool)

Deletes a group.
public void Delete(bool recursive)

Parameters

recursive bool
Value indicating whether to delete all subgroups.

Delete(int)

Deletes a group.
public static void Delete(int groupID)

Parameters

groupID int
The ID of the group to be deleted.

Fill(IDataReader)

Fills object properties according to provided IDataReader.
public override void Fill(IDataReader reader)

Parameters

reader IDataReader
Data holder.

FillRow(DataRow)

Override the FillRow method to map all the properties values to their respective field on the datarow. Used when the object is being saved.
protected override void FillRow(DataRow row)

Parameters

row DataRow
The datarow to fill with data.

GetByKey(string)

Can be used to look up a concrete object based upon the key.
public IPermissionControlled GetByKey(string key)

Parameters

key string
Identifier

Returns

IPermissionControlled
permissionControlled

GetGroupByID(int)

Retrieves a group by its ID.
public static Group GetGroupByID(int groupID)

Parameters

groupID int
The ID of the group to be retrieved.

Returns

Group
Retrieved group or Nothing if group can not be retrieved.

GetGroupDBString(GroupCollection)

Gets group db string
public static string GetGroupDBString(GroupCollection groups)

Parameters

groups GroupCollection
Collection of groups

Returns

string
String value

GetGroups()

Retrieves a collection of all groups.
public static GroupCollection GetGroups()

Returns

GroupCollection
Retrieved groups.

GetGroupsByID(ICollection<int>)

Gets groups by id
public static GroupCollection GetGroupsByID(ICollection<int> ids)

Parameters

ids ICollection<int>
Collection of id

Returns

GroupCollection
GroupCollection

GetGroupsFromString(string)

Retrieves a collection of groups from specified IDs list ('@'-format).
public static GroupCollection GetGroupsFromString(string ids)

Parameters

ids string
Groups IDs ('@'-format).

Returns

GroupCollection
Retrieved groups.

GetGroupsWithSubgroupsByID(ICollection<int>)

public static GroupCollection GetGroupsWithSubgroupsByID(ICollection<int> ids)

Parameters

ids ICollection<int>

Returns

GroupCollection

GetPermissionIdentifier()

Combination of values that form a unique identifier.
public UnifiedPermissionIdentifier GetPermissionIdentifier()

Returns

UnifiedPermissionIdentifier
Unique identifier.

GetPermissionParent()

public IPermissionControlled GetPermissionParent()

Returns

IPermissionControlled

GetTopGroups()

Retrieves a collection of top groups
public static GroupCollection GetTopGroups()

Returns

GroupCollection
Retrieved groups.

GetTopUsers(int, bool)

Gets n top users from current group
public UserCollection GetTopUsers(int top, bool onlyBackEnd)

Parameters

top int
Number of top users to be retrieved
onlyBackEnd bool
If true then only back ed users will be considered

Returns

UserCollection
UserCollection

GetUserCount(bool)

Gets current group users count
public int GetUserCount(bool onlyBackEnd)

Parameters

onlyBackEnd bool
If true then only back ed users will be considered

Returns

int
Number of users

LoadWithUsers()

Loads all groups and their users.
[Obsolete("Use GetGroups")]
public static GroupCollection LoadWithUsers()

Returns

GroupCollection
A collection of all groups with their users loaded.

RemoveAdministrator(int)

Removes specified user from current group administrator collection.
public void RemoveAdministrator(int userID)

Parameters

userID int
The ID of the user to be removed.

RemoveUser(int)

Removes specified user from the current group.
public void RemoveUser(int userID)

Parameters

userID int
The ID of the user to be removed.

Save()

Saves current group.
public override void Save()

SetToCache(IEnumerable<User>)

Puts users collection into cache
[Obsolete("Smart search caching has been removed. Calling this function has no effect.")]
public void SetToCache(IEnumerable<User> usersCollection)

Parameters

usersCollection IEnumerable<User>
Collection of users

UpdateUsersEmailAllowed(bool, int)

Updates email allowed setting
public static void UpdateUsersEmailAllowed(bool isEmailAllowed, int groupId)

Parameters

isEmailAllowed bool
Setting value
groupId int
Id of group
To top