I've got a single page application and in the start page I've linked to the ActionResult "\_ADMIN()"

```
@Html.Action("_ADMIN")

```

Depending on the user's group membership, this ActionResult returns either an EmptyResult or its view:

```
    public ActionResult _ADMIN()
    {
        if (User.IsInRole("admin"))
        {
            return View();
        }
        else
        {
            return new EmptyResult();
        }
    }

```

Its view consists of this one line:

```
@Scripts.Render("~/bundles/admin")  

```

This works but feels suboptimal. I could copy the start page and create seperate ones for non-admins and admins, but that would be even more suboptimal. I'm using MVC 4.

**What's a better way to include a bundle of JavaScript only if the current user is in a certain Active Directory group?**