Skip to content

Commit

Permalink
[FIX] BASE : Fixed the issue while settings the permission to user an…
Browse files Browse the repository at this point in the history
…d the user not able to see the related data
  • Loading branch information
horilla-opensource committed Feb 7, 2025
1 parent a74e02e commit f8395dd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions base/templatetags/basefilters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
Expand Down
1 change: 1 addition & 0 deletions horilla/horilla_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"base",
"employee",
"horilla_documents",
"horilla_automations",
]

NO_PERMISSION_MODALS = [
Expand Down
6 changes: 3 additions & 3 deletions templates/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
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' %}"
Expand Down Expand Up @@ -258,7 +258,7 @@
>
</li>
{% endif %}
{% if perms.base.add_holiday %}
{% if perms.base.add_holidays %}
<li class="oh-sidebar__submenu-item">
<a
href="{% url 'holiday-view' %}"
Expand All @@ -267,7 +267,7 @@
>
</li>
{% endif %}
{% if perms.base.view_companyleave %}
{% if perms.base.view_companyleaves %}
<li class="oh-sidebar__submenu-item">
<a
href="{% url 'company-leave-view' %}"
Expand Down

0 comments on commit f8395dd

Please sign in to comment.