User access to custom application page

01/12/2017 12:02
To enable set e. g. edit permissions for only folder for some specific user who is not member of any sp group, we need to deactivate site collection feature Limited-access user permission lockdown mode 
 
Then user can access its folder and doesn't see other content. He can browse, but sees empty lists. In case of some custom logic using application pages, this user doesn't have access to these pages. To enable it, set following property to OnInitComplete.
 
 
public partial class MyAppPage : LayoutsPageBase
{
      //this enables users which has edit permissions on specific folder to access this page
      protected override void OnInitComplete(EventArgs e)
      {
          RightsCheckMode = RightsCheckModes.None;
      }
 
       protected void Page_Load(object sender, EventArgs e)
       {
       }
}