Table of Contents

Class UserGroupsController

Namespace
Umbraco.Cms.Web.BackOffice.Controllers
Assembly
Umbraco.Web.BackOffice.dll
[Authorize(Policy = "SectionAccessUsers")]
[PrefixlessBodyModelValidator]
public class UserGroupsController : BackOfficeNotificationsController
Inheritance
UserGroupsController
Inherited Members

Constructors

UserGroupsController(IUserService, IContentService, IEntityService, IMediaService, IBackOfficeSecurityAccessor, IUmbracoMapper, ILocalizedTextService, IShortStringHelper, AppCaches)

public UserGroupsController(IUserService userService, IContentService contentService, IEntityService entityService, IMediaService mediaService, IBackOfficeSecurityAccessor backofficeSecurityAccessor, IUmbracoMapper umbracoMapper, ILocalizedTextService localizedTextService, IShortStringHelper shortStringHelper, AppCaches appCaches)

Parameters

userService IUserService
contentService IContentService
entityService IEntityService
mediaService IMediaService
backofficeSecurityAccessor IBackOfficeSecurityAccessor
umbracoMapper IUmbracoMapper
localizedTextService ILocalizedTextService
shortStringHelper IShortStringHelper
appCaches AppCaches

Methods

GetEmptyUserGroup()

Returns the scaffold for creating a new user group

public UserGroupDisplay? GetEmptyUserGroup()

Returns

UserGroupDisplay

GetUserGroup(int)

Return a user group

[Authorize(Policy = "UserBelongsToUserGroupInRequest")]
public ActionResult<UserGroupDisplay?> GetUserGroup(int id)

Parameters

id int

Returns

ActionResult<UserGroupDisplay>

GetUserGroups(bool)

Returns all user groups

public IEnumerable<UserGroupBasic> GetUserGroups(bool onlyCurrentUserGroups = true)

Parameters

onlyCurrentUserGroups bool

Returns

IEnumerable<UserGroupBasic>

PostDeleteUserGroups(int[])

[HttpPost]
[HttpDelete]
[Authorize(Policy = "UserBelongsToUserGroupInRequest")]
public IActionResult PostDeleteUserGroups(int[] userGroupIds)

Parameters

userGroupIds int[]

Returns

IActionResult

PostSaveUserGroup(UserGroupSave)

public ActionResult<UserGroupDisplay?> PostSaveUserGroup(UserGroupSave userGroupSave)

Parameters

userGroupSave UserGroupSave

Returns

ActionResult<UserGroupDisplay>