# How to automatically create a folder for a user and limit access

In some cases, you might want to automatize creating a new folder for the user of a specified user group and limit access within that folder only. It is actual if you are working on a portal or catalogue and need to set up permissions and give the users limited access to avoid managing images uploaded by other users.&#x20;

Such a scenario means every user will have access to the own folder only which is important for the website where various authors publishing the content.

### Add scope with variable

To create such a scenario, let's use the default scope Images. Change the path to:

`/images/user/{user_ID}`

According to such logic, when a user accesses Quantum Manager, a new folder will be created if it yet not exists, and all such folders to be stored in `/user` folder. E.g. the user has `ID 636`, and the folder with the same name is created.

<figure><img src="https://norrnext.com/images/docs/quantum-manager/scope-user-variable.png" alt="Update default scope with user variable in Quantum Manager"><figcaption><p>Update default scope with user variable</p></figcaption></figure>

Now the user is limited in own folder:

<figure><img src="https://norrnext.com/images/docs/quantum-manager/scope-user-variable2.png" alt="The result"><figcaption><p>The result</p></figcaption></figure>

By default, the Image scope creates a new folder according to user's ID.

### Permissions

Now it's time to set up permissions to the specified user group to access. Let it be *Manager* User Group. By default, managers do not have access to the component, so let change the state in permissions.

Go to *Components > Quantum Manager > Options > Permissions*\
Then click on *Manager* tab and set Access Administration Interface to *Allowed*.

<figure><img src="https://norrnext.com/images/docs/quantum-manager/manager-allow-access.png" alt="Allow access to the Quantum Administration Interface for Managers"><figcaption><p>Allow access to the Quantum Administration Interface for Managers</p></figcaption></figure>

More information on how to work with Joomla permissions in the official [Access Control List Tutorial](https://docs.joomla.org/J3.x:Access_Control_List_Tutorial).

Now the user of Manager User Group can access Quantum Manager and work inside their own image folder only.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.norrnext.com/quantum-manager/best-practices/how-to-automatically-create-a-folder-for-a-user-and-limit-access.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
