View Source
  Class UserGroupsController
  
  
  
  
    Inheritance
      System.Object
      Microsoft.AspNetCore.Mvc.ControllerBase
      
      
      
      
      
      
   
  
  Assembly: Umbraco.Web.BackOffice.dll
  Syntax
  
    [Authorize(Policy = "SectionAccessUsers")]
[PrefixlessBodyModelValidator]
public class UserGroupsController : BackOfficeNotificationsController
   
  Constructors
  
  
    View Source
  
  UserGroupsController(IUserService, IContentService, IEntityService, IMediaService, IBackOfficeSecurityAccessor, IUmbracoMapper, ILocalizedTextService, IShortStringHelper, AppCaches)
  
  
  Declaration
  
    public UserGroupsController(IUserService userService, IContentService contentService, IEntityService entityService, IMediaService mediaService, IBackOfficeSecurityAccessor backofficeSecurityAccessor, IUmbracoMapper umbracoMapper, ILocalizedTextService localizedTextService, IShortStringHelper shortStringHelper, AppCaches appCaches)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | IUserService | 
        userService | 
         | 
      
      
        | IContentService | 
        contentService | 
         | 
      
      
        | IEntityService | 
        entityService | 
         | 
      
      
        | IMediaService | 
        mediaService | 
         | 
      
      
        | IBackOfficeSecurityAccessor | 
        backofficeSecurityAccessor | 
         | 
      
      
        | IUmbracoMapper | 
        umbracoMapper | 
         | 
      
      
        | ILocalizedTextService | 
        localizedTextService | 
         | 
      
      
        | IShortStringHelper | 
        shortStringHelper | 
         | 
      
      
        | AppCaches | 
        appCaches | 
         | 
      
    
  
  Methods
  
  
    View Source
  
  GetEmptyUserGroup()
  Returns the scaffold for creating a new user group
 
  
  Declaration
  
    public UserGroupDisplay? GetEmptyUserGroup()
   
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Nullable<UserGroupDisplay> | 
         | 
      
    
  
  
    View Source
  
  GetUserGroup(Int32)
  
  
  Declaration
  
    [Authorize(Policy = "UserBelongsToUserGroupInRequest")]
public ActionResult<UserGroupDisplay?> GetUserGroup(int id)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        id | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult<System.Nullable<UserGroupDisplay>> | 
         | 
      
    
  
  
    View Source
  
  GetUserGroups(Boolean)
  
  
  Declaration
  
    public IEnumerable<UserGroupBasic> GetUserGroups(bool onlyCurrentUserGroups = true)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Boolean | 
        onlyCurrentUserGroups | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | IEnumerable<UserGroupBasic> | 
         | 
      
    
  
  
    View Source
  
  PostDeleteUserGroups(Int32[])
  
  
  Declaration
  
    [HttpPost]
[HttpDelete]
[Authorize(Policy = "UserBelongsToUserGroupInRequest")]
public IActionResult PostDeleteUserGroups([FromQuery] int[] userGroupIds)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32[] | 
        userGroupIds | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.IActionResult | 
         | 
      
    
  
  
    View Source
  
  PostSaveUserGroup(UserGroupSave)
  
  
  Declaration
  
    public ActionResult<UserGroupDisplay?> PostSaveUserGroup(UserGroupSave userGroupSave)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | UserGroupSave | 
        userGroupSave | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult<System.Nullable<UserGroupDisplay>> | 
         |