[FIX] BASE : Fixed the issue while settings the permission to user and the user not able to see the related data

This commit is contained in:
Horilla
2025-02-07 13:26:59 +05:30
parent a74e02ed59
commit f8395dd2c5
3 changed files with 8 additions and 7 deletions

View File

@@ -120,13 +120,13 @@ def abs_value(value):
def config_perms(user):
app_permissions = {
"leave": [
"leave.add_holiday",
"leave.change_holiday",
"leave.add_companyleaves",
"leave.change_companyleaves",
"leave.view_restrictleave",
],
"base": [
"base.add_holiday",
"base.change_holiday",
"base.add_companyleaves",
"base.change_companyleaves",
"base.add_horillamailtemplates",
"base.view_horillamailtemplates",
],

View File

@@ -51,6 +51,7 @@ APPS = [
"base",
"employee",
"horilla_documents",
"horilla_automations",
]
NO_PERMISSION_MODALS = [

View File

@@ -229,7 +229,7 @@ function initializeSummernote(candId,searchWords,) {
style="display: none"
>
<ul class="oh-sidebar__submenu-items">
{% if "leave"|app_installed and perms.Leave.view_leaverequest %}
{% if "leave"|app_installed and perms.base.view_multipleapprovalcondition %}
<li class="oh-sidebar__submenu-item">
<a
href="{% url 'multiple-approval-condition' %}"
@@ -258,7 +258,7 @@ function initializeSummernote(candId,searchWords,) {
>
</li>
{% endif %}
{% if perms.base.add_holiday %}
{% if perms.base.add_holidays %}
<li class="oh-sidebar__submenu-item">
<a
href="{% url 'holiday-view' %}"
@@ -267,7 +267,7 @@ function initializeSummernote(candId,searchWords,) {
>
</li>
{% endif %}
{% if perms.base.view_companyleave %}
{% if perms.base.view_companyleaves %}
<li class="oh-sidebar__submenu-item">
<a
href="{% url 'company-leave-view' %}"