View Source
  Class PublicAccessController
  
  
  
  
    Inheritance
      System.Object
      Microsoft.AspNetCore.Mvc.ControllerBase
      
      
      
      
      
      
   
  
  Assembly: Umbraco.Web.BackOffice.dll
  Syntax
  
    [Authorize(Policy = "TreeAccessDocuments")]
public class PublicAccessController : BackOfficeNotificationsController
   
  Constructors
  
  
    View Source
  
  PublicAccessController(IPublicAccessService, IContentService, IEntityService, IMemberService, IUmbracoMapper, IMemberRoleManager)
  
  
  Declaration
  
    public PublicAccessController(IPublicAccessService publicAccessService, IContentService contentService, IEntityService entityService, IMemberService memberService, IUmbracoMapper umbracoMapper, IMemberRoleManager memberRoleManager)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | IPublicAccessService | 
        publicAccessService | 
         | 
      
      
        | IContentService | 
        contentService | 
         | 
      
      
        | IEntityService | 
        entityService | 
         | 
      
      
        | IMemberService | 
        memberService | 
         | 
      
      
        | IUmbracoMapper | 
        umbracoMapper | 
         | 
      
      
        | IMemberRoleManager | 
        memberRoleManager | 
         | 
      
    
  
  Methods
  
  
    View Source
  
  GetPublicAccess(Int32)
  
  
  Declaration
  
    [Authorize(Policy = "ContentPermissionProtectById")]
[HttpGet]
public ActionResult<PublicAccess> GetPublicAccess(int contentId)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        contentId | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult<PublicAccess> | 
         | 
      
    
  
  
    View Source
  
  PostPublicAccess(Int32, String[], String[], Int32, Int32)
  
  
  Declaration
  
    [Authorize(Policy = "ContentPermissionProtectById")]
[HttpPost]
public IActionResult PostPublicAccess(int contentId, [FromQuery(Name = "groups[]")] string[] groups, [FromQuery(Name = "usernames[]")] string[] usernames, int loginPageId, int errorPageId)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        contentId | 
         | 
      
      
        | System.String[] | 
        groups | 
         | 
      
      
        | System.String[] | 
        usernames | 
         | 
      
      
        | System.Int32 | 
        loginPageId | 
         | 
      
      
        | System.Int32 | 
        errorPageId | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.IActionResult | 
         | 
      
    
  
  
    View Source
  
  RemovePublicAccess(Int32)
  
  
  Declaration
  
    [Authorize(Policy = "ContentPermissionProtectById")]
[HttpPost]
public IActionResult RemovePublicAccess(int contentId)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        contentId | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.IActionResult | 
         |