[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): def config_perms(user):
app_permissions = { app_permissions = {
"leave": [ "leave": [
"leave.add_holiday",
"leave.change_holiday",
"leave.add_companyleaves",
"leave.change_companyleaves",
"leave.view_restrictleave", "leave.view_restrictleave",
], ],
"base": [ "base": [
"base.add_holiday",
"base.change_holiday",
"base.add_companyleaves",
"base.change_companyleaves",
"base.add_horillamailtemplates", "base.add_horillamailtemplates",
"base.view_horillamailtemplates", "base.view_horillamailtemplates",
], ],

View File

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

View File

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