# file-manager-access-control

> File manager applies role-based permissions to restrict files and available operations.

**Framework:** aspnet-mvc  **Component:** FileManager  **Variant:** access-control

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/aspnet-mvc/file-manager-access-control.json
```

**Install Package(s)**

```bash
Install-Package Syncfusion.AspNetMvc.FileManager
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/file-manager-access-control/FileManager.cshtml

```cshtml
@using Syncfusion.EJ2.FileManager
@using EJ2MVCSampleBrowser.Models

@{
    string[] items = new string[] { "NewFolder", "Cut", "Copy", "Paste", "Delete", "Download", "Rename", "SortBy", "Refresh", "Selection", "View", "Details" };
    string[] layout = new string[] { "SortBy", "View", "Refresh", "|", "Paste", "|", "NewFolder", "|", "Details", "|", "SelectAll" };
    string[] file = new string[] { "Cut", "Copy", "|", "Delete", "Download", "Rename", "|", "Details" };

}

@section ControlsSection{
    <div class="control-section">
        <div class="sample-container">
            <!-- File Manager full functionalities sample -->
            @Html.EJS().FileManager("filemanager").AjaxSettings(
              new Syncfusion.EJ2.FileManager.FileManagerAjaxSettings
              {
                  Url = "https://physical-service.syncfusion.com/api/FileManagerAccess/FileOperations",
                  GetImageUrl = "https://physical-service.syncfusion.com/api/FileManagerAccess/GetImage",
                  UploadUrl = "https://physical-service.syncfusion.com/api/FileManagerAccess/Upload",
                  DownloadUrl = "https://physical-service.syncfusion.com/api/FileManagerAccess/Download"
              }).ToolbarSettings(new Syncfusion.EJ2.FileManager.FileManagerToolbarSettings()
              {
                  Items = items
              }).UploadSettings(new FileManagerUploadSettings
              {
                 DirectoryUpload = true
              }).Render()
        </div>
    </div>
}

```

### src/components/file-manager-access-control/FileManagerController.cs

```cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using EJ2MVCSampleBrowser.Models;

namespace EJ2MVCSampleBrowser.Controllers
{
    public partial class FileManagerController : Controller
    {
        public ActionResult AccessControl()
        {
            return View("~/Views/Home/file-manager/access-control/FileManager.cshtml");
        }
    }
}
```
