mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 15:33:45 +00:00
PEP8 is for everyone.
This commit is contained in:
parent
74a44b7e92
commit
bf55bf0fa9
1 changed files with 13 additions and 5 deletions
|
@ -1361,8 +1361,10 @@ class Interface(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model):
|
||||||
if not (user_request.has_perm("machines.delete_interface") and can_user):
|
if not (user_request.has_perm("machines.delete_interface") and can_user):
|
||||||
return (
|
return (
|
||||||
False,
|
False,
|
||||||
_("You don't have the right to delete interfaces of another"
|
_(
|
||||||
" user."),
|
"You don't have the right to delete interfaces of another"
|
||||||
|
" user."
|
||||||
|
),
|
||||||
("machines.delete_interface",) + (permissions or ()),
|
("machines.delete_interface",) + (permissions or ()),
|
||||||
)
|
)
|
||||||
return True, None, None
|
return True, None, None
|
||||||
|
@ -1464,7 +1466,9 @@ class Ipv6List(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model):
|
||||||
if not (user_request.has_perm("machines.change_ipv6list") and can_user):
|
if not (user_request.has_perm("machines.change_ipv6list") and can_user):
|
||||||
return (
|
return (
|
||||||
False,
|
False,
|
||||||
_("You don't have the right to edit ipv6 of a machine of another user."),
|
_(
|
||||||
|
"You don't have the right to edit ipv6 of a machine of another user."
|
||||||
|
),
|
||||||
("machines.change_ipv6list",),
|
("machines.change_ipv6list",),
|
||||||
)
|
)
|
||||||
return True, None, None
|
return True, None, None
|
||||||
|
@ -1482,7 +1486,9 @@ class Ipv6List(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model):
|
||||||
if not (user_request.has_perm("machines.delete_ipv6list") and can_user):
|
if not (user_request.has_perm("machines.delete_ipv6list") and can_user):
|
||||||
return (
|
return (
|
||||||
False,
|
False,
|
||||||
_("You don't have the right to delete ipv6 of a machine of another user."),
|
_(
|
||||||
|
"You don't have the right to delete ipv6 of a machine of another user."
|
||||||
|
),
|
||||||
("machines.delete_ipv6list",) + (permissions or ()),
|
("machines.delete_ipv6list",) + (permissions or ()),
|
||||||
)
|
)
|
||||||
return True, None, None
|
return True, None, None
|
||||||
|
@ -1499,7 +1505,9 @@ class Ipv6List(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model):
|
||||||
):
|
):
|
||||||
return (
|
return (
|
||||||
False,
|
False,
|
||||||
_("You don't have the right to view ipv6 of machines other than yours."),
|
_(
|
||||||
|
"You don't have the right to view ipv6 of machines other than yours."
|
||||||
|
),
|
||||||
("machines.view_ipv6list",),
|
("machines.view_ipv6list",),
|
||||||
)
|
)
|
||||||
return True, None, None
|
return True, None, None
|
||||||
|
|
Loading…
Reference in a new issue