146_Minor_improvements #150
@ -181,9 +181,7 @@ class CompensationTable(BaseTable, TableRenderMixin):
|
|||||||
"""
|
"""
|
||||||
if value is None:
|
if value is None:
|
||||||
value = User.objects.none()
|
value = User.objects.none()
|
||||||
has_access = value.filter(
|
has_access = record.is_shared_with(self.user)
|
||||||
id=self.user.id
|
|
||||||
).exists()
|
|
||||||
|
|
||||||
html = self.render_icn(
|
html = self.render_icn(
|
||||||
tooltip=_("Full access granted") if has_access else _("Access not granted"),
|
tooltip=_("Full access granted") if has_access else _("Access not granted"),
|
||||||
@ -343,7 +341,7 @@ class EcoAccountTable(BaseTable, TableRenderMixin):
|
|||||||
html = ""
|
html = ""
|
||||||
# Do not use value in here, since value does use unprefetched 'users' manager, where record has already
|
# Do not use value in here, since value does use unprefetched 'users' manager, where record has already
|
||||||
# prefetched users data
|
# prefetched users data
|
||||||
has_access = self.user in record.users.all()
|
has_access = record.is_shared_with(self.user)
|
||||||
html += self.render_icn(
|
html += self.render_icn(
|
||||||
tooltip=_("Full access granted") if has_access else _("Access not granted"),
|
tooltip=_("Full access granted") if has_access else _("Access not granted"),
|
||||||
icn_class="fas fa-edit rlp-r-inv" if has_access else "far fa-edit",
|
icn_class="fas fa-edit rlp-r-inv" if has_access else "far fa-edit",
|
||||||
|
@ -151,9 +151,7 @@ class EmaTable(BaseTable, TableRenderMixin):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
html = ""
|
html = ""
|
||||||
has_access = value.filter(
|
has_access = record.is_shared_with(self.user)
|
||||||
id=self.user.id
|
|
||||||
).exists()
|
|
||||||
|
|
||||||
html += self.render_icn(
|
html += self.render_icn(
|
||||||
tooltip=_("Full access granted") if has_access else _("Access not granted"),
|
tooltip=_("Full access granted") if has_access else _("Access not granted"),
|
||||||
|
@ -177,9 +177,7 @@ class InterventionTable(BaseTable, TableRenderMixin):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
html = ""
|
html = ""
|
||||||
has_access = value.filter(
|
has_access = record.is_shared_with(self.user)
|
||||||
id=self.user.id
|
|
||||||
).exists()
|
|
||||||
|
|
||||||
html += self.render_icn(
|
html += self.render_icn(
|
||||||
tooltip=_("Full access granted") if has_access else _("Access not granted"),
|
tooltip=_("Full access granted") if has_access else _("Access not granted"),
|
||||||
|
Loading…
Reference in New Issue
Block a user