Click or drag to resize

UserGroupController Methods

The UserGroupController type exposes the following members.

Methods
  NameDescription
Public methodAddUserGroupMember(Int32, Int32)
Public methodStatic memberAddUserGroupMember(Int32, Int32, SqlConnection, SqlTransaction)
Adds a user to a group. Must not be called for Everyone or for personal groups.
Protected methodBuildCacheKey
Builds a cache key for use with GetFromCacheIfPresent. The cache key is not hashed because we have experienced a collision using GetHashCode() ie. the cache keys are quite long and there is a price in dictionary size in memory and in dictionary lookups.
(Inherited from ControllerBase.)
Protected methodCheckObjectOperationSecurity
Checks that the active user is allowed to perform an CRUD operation on a specific configuration object. (note: except that a Create operation is not for a specific object). Throws a SecurityException if not. Method can be used for all configuration objects that are represented by a ConfigurationObjectType (except those that have a compound key). Method checks auth role security as well as whether it is allowed to modify builtin/feature package objects.
(Inherited from ControllerBase.)
Protected methodCheckObjectSaveOperationSecurity
Checks that the active user is allowed to Create a new - or Update an existing configuration object. Throws a SecurityException if not. Method can be used for all configuration objects that are represented by a ConfigurationObjectType (except those that have a compound key). Method checks auth role security as well as whether it is allowed to modify builtin/feature package objects.
(Inherited from ControllerBase.)
Public methodConvertId(Int32, ConfigurationObjectType)
Converts the integer id of an object to its transport-safe unique id (UId).
(Inherited from ControllerBase.)
Public methodConvertId(String, ConfigurationObjectType)
Converts a string representation of an integer or Guid id to an integer id.
(Inherited from ControllerBase.)
Public methodConvertId(Guid, ConfigurationObjectType, Boolean)
Converts the transport-safe unique id (UId) of an object to its integer id.
(Inherited from ControllerBase.)
Public methodConvertIds(IEnumerableGuid, ConfigurationObjectType)
Converts the transport-safe unique ids (UId) of a number of objects to integer ids.
(Inherited from ControllerBase.)
Public methodConvertIds(IEnumerableInt32, ConfigurationObjectType)
Converts the integer ids of a number of objects to their transport-safe unique ids (UId).
(Inherited from ControllerBase.)
Protected methodCreateCommand(SQLBuilder) (Inherited from ControllerBase.)
Protected methodCreateCommand(String) (Inherited from ControllerBase.)
Protected methodCreateSqlBulkCopy
Create a new SqlBulkCopy instance using the connection, transaction and timeout values from the controller
(Inherited from ControllerBase.)
Public methodDeleteUserGroupMember(Int32, Int32)
Public methodStatic memberDeleteUserGroupMember(Int32, Int32, SqlConnection, SqlTransaction)
Public methodDeleteUserGroupMembers(Int32, IntegerList)
Public methodStatic memberDeleteUserGroupMembers(Int32, IntegerList, SqlConnection, SqlTransaction)
Public methodDoInConnection(ControllerBaseActionWithNoResult)
Executes an action that doesn't return a result. If no current connection exists, it will establish a connection to the database and close it afterwards. An existing connection will be reused. Inside the action, the connection is available as DbConnection.
(Inherited from ControllerBase.)
Public methodDoInConnection(ActionSqlConnection, SqlTransaction, Boolean)
Executes an action that doesn't return a result. If no current connection exists, it will establish a connection to the database and close it afterwards. Connection and Transaction are passed to delegate, to allow passing to other controllers An existing connection will be reused. Inside the action, the connection is available as DbConnection. To ensure a new connection set forceNew to true.
(Inherited from ControllerBase.)
Public methodDoInConnectionT(ControllerBaseActionWithResultT)
Executes an action and returns the result. If no current connection exists, it will establish a connection to the database and close it afterwards. An existing connection will be reused. Inside the action, the connection is available as DbConnection.
(Inherited from ControllerBase.)
Public methodDoInTransaction(ControllerBaseActionWithNoResult)
Executes an action (that doesn't return a result) in a transaction. If no current connection and/or transaction exists, it will establish it and commit and close it afterwards. An existing connection/transaction will be reused. Inside the action, the connection is available as DbConnection and the transaction as DbTransaction.
(Inherited from ControllerBase.)
Public methodDoInTransactionT(ControllerBaseActionWithResultT)
Executes an action in a transaction and returns the result. If no current connection and/or transaction exists, it will establish it and commit and close it afterwards. An existing connection/transaction will be reused. Inside the action, the connection is available as DbConnection and the transaction as DbTransaction.
(Inherited from ControllerBase.)
Public methodDoInTransactionT(FuncSqlConnection, SqlTransaction, T, Boolean)
Executes an action in a transaction and returns the result. Connection and Transaction are passed to delegate, to allow passing to other controllers If no current connection and/or transaction exists, it will establish it and commit and close it afterwards. An existing connection/transaction will be reused. Set forceNew to true to ensure new connection and transaction Inside the action, the connection is available as DbConnection and the transaction as DbTransaction.
(Inherited from ControllerBase.)
Protected methodDoInTransactionUnlessPostponedDueToPreviousDefaultResultT
The method can postpone a SQL transaction implemented by action if the method returns a default number, eg. 0. If the the action method throws a SQL transitent error, then the next call to action is also postponed.
(Inherited from ControllerBase.)
Protected methodDoUnlessPostponedDueToPreviousDefaultResultT
The method can postpone a method invocation if the previous call returned a default number, eg. 0.
(Inherited from ControllerBase.)
Protected methodExecScalarResultQueryT
Executes a query with a scalar result.
(Inherited from ControllerBase.)
Public methodExecuteMutexOperation(String, Action, Boolean) (Inherited from ControllerBase.)
Protected methodExecuteMutexOperationT(String, FuncT, Boolean) (Inherited from ControllerBase.)
Protected methodExpireCacheItem (Inherited from ControllerBase.)
Protected methodGetDbUTCNow
(Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultIntegerList, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultAppIdentity, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultBoolean, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultIListGuid, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultListGuid, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultListInt32, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultGuid, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultInt32, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultTimeZoneInfo, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresentT(String, ControllerBaseActionWithResultListT, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresentT(String, ControllerBaseActionWithResultT, ControllerBaseCacheOptions)
Retrieves some data from the cache or (if it is not there) executes an action and stores the result in the cache. Caching is not applied if the IgnoreCacheContext is used (depending on the parameter for it). Note: caching should only be used with great care as there are a number of potential issues involved in using it!
(Inherited from ControllerBase.)
Public methodGetGroupAuthRoleIds
Returns the auth roles that a number of groups are assigned to.
Public methodGetGroupMembers(Int32)
Returns the users that are member of at least one of the specified user groups. Members are not returned if they are deleted. Members are not returned if they are system users. Security is not considered!
Public methodStatic memberGetGroupMembers(IntegerList, SqlConnection, SqlTransaction)
Returns the users that are member of at least one of the specified user groups. Members are not returned if they are deleted. Members are not returned if they are system users. Security is not considered!
Public methodStatic memberGetGroupMembers(Int32, SqlConnection, SqlTransaction)
Returns the users that are member of at least one of the specified user groups. Members are not returned if they are deleted. Members are not returned if they are system users. Security is not considered!
Public methodGetMemberIdsByGroup
Returns groups (ids) and their members
Protected methodGetNewRowIdentity (Inherited from ControllerBase.)
Protected methodGetObjectDataVersion
Gets the data version of an object.
(Inherited from ControllerBase.)
Public methodGetUIds(IEnumerableInt32)
Returns the U(nique)Ids of one or more user groups from their Ids. The UId of a user group remains the same when it is transported to another system. This is not the case with the Id of a user group. The method doesn't consider the security model. The method doesn't consider whether the data object is marked as deleted.
Public methodStatic memberGetUIds(IEnumerableInt32, SqlConnection, SqlTransaction)
Returns the U(nique)Ids of one or more user groups from their Ids. The UId of a user group remains the same when it is transported to another system. This is not the case with the Id of a user group. The method doesn't consider the security model. The method doesn't consider whether the data object is marked as deleted.
Public methodGetUserGroupCount(UserGroupCountLoadOptions)
Public methodStatic memberGetUserGroupCount(UserGroupCountLoadOptions, SqlConnection, SqlTransaction)
Public methodGetUserGroupId
Returns the id of a group from its name.
Public methodGetUserGroupIds(UserGroupIdLoadOptions)
Public methodStatic memberGetUserGroupIds(UserGroupIdLoadOptions, SqlConnection, SqlTransaction)
Public methodGetUserGroupManager(UserGroupLoadOptions)
Public methodStatic memberGetUserGroupManager(UserGroupLoadOptions, SqlConnection, SqlTransaction)
Public methodGetUserGroupMemberIds(IntegerList)
Returns the users that are member of at least one of the specified user groups. Members are not returned if they are deleted.
Public methodGetUserGroupMemberIds(Int32)
Public methodStatic memberGetUserGroupMemberIds(Int32, SqlConnection, SqlTransaction)
Returns the userid's of the members in a usergroup. Deleted users are not returned.
Public methodGetUserGroupRolesIds(IntegerList)
Public methodStatic memberGetUserGroupRolesIds(IntegerList, SqlConnection, SqlTransaction)
Returns a distinct list of ids of auth roles that are held by a number of user groups.
Public methodGetUserGroups(IEnumerableInt32, UserGroupLoadOptions)
Returns a number of user group objects. The loadoptions can be used to specify additional load options - except IdPosList.
Public methodStatic memberGetUserGroups(IEnumerableInt32, UserGroupLoadOptions, SqlConnection, SqlTransaction)
Returns a number of user group objects. The loadoptions can be used to specify additional load options - except IdPosList.
Protected methodIncrementDataVersion
(Inherited from ControllerBase.)
Protected methodIncrementObjectDataVersion(IEntityObject)
Increments the data version of an entity object. The data version is incremented in the db as well as on the object itself. Method is used to update the data version of an object when an aggregated object is created/modified/deleted. The purpose is to ensure that the id-based cache (in AppIdentity) is updated properly.
(Inherited from ControllerBase.)
Protected methodIncrementObjectDataVersion(Int32, EntityObjectType)
Increments the data version of an entity object in the db. Method is used to update the data version of an object when an aggregated object is created/modified/deleted. The purpose is to ensure that the id-based cache (in AppIdentity) is updated properly.
(Inherited from ControllerBase.)
Public methodIsGroupMember(Int32, Int32)
Returns true if the stated user is member of the stated group.
Public methodStatic memberIsGroupMember(Int32, Int32, SqlConnection, SqlTransaction)
Returns true if the stated user is member of the stated group.
Public methodIsPersonalGroup(Int32)
Public methodStatic memberIsPersonalGroup(Int32, SqlConnection, SqlTransaction)
Public methodStatic memberIsPersonalGroup(Int32, Int32, Boolean, SqlConnection, SqlTransaction)
Public methodMarkUserGroupAsDeleted(Int32)
Deletes the specified usergroup by setting a marker.
Public methodStatic memberMarkUserGroupAsDeleted(Int32, SqlConnection, SqlTransaction)
Deletes the specified usergroup by setting a marker.
Protected methodPopulateTempTableT
Creates a temporary db table with a single column and populates it with values.
(Inherited from ControllerBase.)
Protected methodPostponeTransientErrorT
If the action throws a transient sql error, the exception is eaten. An entry is written to the log with level Information. The entire exception is written to the log with level Debug.
(Inherited from ControllerBase.)
Public methodStatic memberRemoveAllInactiveUserGroupMemberships
Removes group memberships for all inactive users.
Public methodSaveUserGroup(UserGroup, UserGroupSaveOptions)
Public methodStatic memberSaveUserGroup(UserGroup, UserGroupSaveOptions, SqlConnection, SqlTransaction)
Public methodSaveUserGroupMembers(Int32, IEnumerableInt32, Boolean)
Public methodStatic memberSaveUserGroupMembers(UserGroup, SqlConnection, SqlTransaction)
Public methodStatic memberSaveUserGroupMembers(Int32, IEnumerableInt32, Boolean, SqlConnection, SqlTransaction)
Public methodStatic memberSaveUserGroupMembers(Int32, IEnumerableInt32, Boolean, Boolean, SqlConnection, SqlTransaction)
Public methodSaveUserGroupRoles(UserGroup)
Public methodStatic memberSaveUserGroupRoles(UserGroup, SqlConnection, SqlTransaction) Obsolete.
Public methodStatic memberSaveUserUserGroups
Stores the group memberships of a user based the Groups collection. Existing group memberships not available in Groups are removed. The memberhip of personal user groups and everyone are never removed.
Protected methodTransferUIdsToIdsLoadOption
Converts/transfers one or more specified uids in a loadoptions object to ids. The purpose is to enable caching as IEntityObjectsLoadOptions.IdList only works with ids (and not uids).
(Inherited from ControllerBase.)
Public methodStatic memberTranslatePersonalGroupIds
Translates personal group ids to user ids.
Public methodUnfoldGroupMembers(IntegerList)
Returns the ids of all users who are member of at least one of the specified groups.
Public methodStatic memberUnfoldGroupMembers(IntegerList, SqlConnection, SqlTransaction)
Returns the ids of all users who are member of at least one of the specified groups.
Protected methodValidateDataVersionT
Validates that the data version of an object corresponds to the data version in the DB. Method is used for validation before saving an object.
(Inherited from ControllerBase.)
Top
Extension Methods
  NameDescription
Public Extension MethodToBool
Converts object to boolean.
(Defined by ObjectExtensions.)
Public Extension MethodToDateTime
Converts object to DateTime.
(Defined by ObjectExtensions.)
Public Extension MethodToInt
Converts object to integer.
(Defined by ObjectExtensions.)
Top
See Also