# Leave Hierarchy

Before diving into the leave hierarchy, it's important to understand the role of permissions in the Leave Module.

We have introduced a new permission called **"Grant Admin Leave Permission."** This permission determines how leave requests are managed and viewed:

1. **When this permission is enabled**
   * Any role with this permission will have full access to all leave requests.
   * These users can view, approve, reject, or take any necessary action on all leave types.
   * In this case, setting up a leave hierarchy is **not mandatory.**
2. **When this permission is not enabled**
   * A leave hierarchy must be defined for every leave type.
   * If a leave hierarchy is **not** created for a specific leave type, leave requests for that type will remain hidden from everyone **except the Super Admin.**

#### Configuring Leave Hierarchy

To ensure that only specific teams, departments, or leads can manage leave requests:

* Create role types with **all relevant permissions enabled**, except **"Grant Admin Leave Permission."**
* Assign these roles within the leave hierarchy based on departments or teams.
* This setup ensures that only designated personnel within the hierarchy can view and manage leave requests for their respective departments.

In summary, the **"Grant Admin Leave Permission"** provides unrestricted access, bypassing the need for a leave hierarchy. However, if you require department-specific control over leave requests, configure a hierarchy and assign appropriate roles accordingly.


---

# 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://cyclone-nepal.gitbook.io/digital-hr-user-manual/leave-management/leave-hierarchy.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.
