mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-09-12 01:03:09 +00:00
bug fix historique alias
This commit is contained in:
parent
97eb065337
commit
a26487f5a2
4 changed files with 10 additions and 4 deletions
|
@ -109,6 +109,11 @@ class BanAdmin(VersionAdmin):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class MailAliasAdmin(VersionAdmin):
|
||||||
|
"""Gestion des alias mail"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class WhitelistAdmin(VersionAdmin):
|
class WhitelistAdmin(VersionAdmin):
|
||||||
"""Gestion des whitelist"""
|
"""Gestion des whitelist"""
|
||||||
pass
|
pass
|
||||||
|
@ -212,6 +217,7 @@ admin.site.register(School, SchoolAdmin)
|
||||||
admin.site.register(ListRight, ListRightAdmin)
|
admin.site.register(ListRight, ListRightAdmin)
|
||||||
admin.site.register(ListShell, ListShellAdmin)
|
admin.site.register(ListShell, ListShellAdmin)
|
||||||
admin.site.register(Ban, BanAdmin)
|
admin.site.register(Ban, BanAdmin)
|
||||||
|
admin.site.register(MailAlias, MailAliasAdmin)
|
||||||
admin.site.register(Whitelist, WhitelistAdmin)
|
admin.site.register(Whitelist, WhitelistAdmin)
|
||||||
admin.site.register(Request, RequestAdmin)
|
admin.site.register(Request, RequestAdmin)
|
||||||
# Now register the new UserAdmin...
|
# Now register the new UserAdmin...
|
||||||
|
|
|
@ -1635,7 +1635,7 @@ class MailAlias(RevMixin, AclMixin, models.Model):
|
||||||
"""
|
"""
|
||||||
Define a alias for a user Mail
|
Define a alias for a user Mail
|
||||||
|
|
||||||
Définit un aliase pour un Mail d'utilisateur
|
Définit un alias pour un Mail d'utilisateur
|
||||||
"""
|
"""
|
||||||
user = models.ForeignKey(
|
user = models.ForeignKey(
|
||||||
User,
|
User,
|
||||||
|
@ -1670,7 +1670,7 @@ class MailAlias(RevMixin, AclMixin, models.Model):
|
||||||
|
|
||||||
def can_view(self, user_request, *_args, **_kwargs):
|
def can_view(self, user_request, *_args, **_kwargs):
|
||||||
"""
|
"""
|
||||||
Check if the user can view the aliases
|
Check if the user can view the alias
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if user_request.has_perm('users.view_mailalias') or user.request == self.user:
|
if user_request.has_perm('users.view_mailalias') or user.request == self.user:
|
||||||
|
|
|
@ -41,7 +41,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% can_edit alias %}
|
{% can_edit alias %}
|
||||||
{% include 'buttons/edit.html' with href='users:edit-mailalias' id=alias.id %}
|
{% include 'buttons/edit.html' with href='users:edit-mailalias' id=alias.id %}
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% include 'buttons/history.html' with href='users:history' name='alias' id=alias.id %}
|
{% include 'buttons/history.html' with href='users:history' name='mailalias' id=alias.id %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
|
@ -468,7 +468,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
</a>
|
</a>
|
||||||
{% acl_end %}
|
{% acl_end %}
|
||||||
{% if alias_list %}
|
{% if alias_list %}
|
||||||
{% include "users/aff_alias.html" with alias_list=alias_list %}
|
{% include "users/aff_mailalias.html" with alias_list=alias_list %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
Loading…
Reference in a new issue