[PATCH 1 of 4 saem] [security] Test and fix permissions for ARK NAA

Denis Laxalde denis.laxalde at logilab.fr
Fri Apr 14 09:45:59 CEST 2017


Sylvain Thenault a écrit :
> # HG changeset patch
> # User Sylvain Thénault <sylvain.thenault at logilab.fr>
> # Date 1492069848 -7200
> #      Thu Apr 13 09:50:48 2017 +0200
> # Node ID 5c0cbe8138b54b1a2eb599c0b52def7b425049e0
> # Parent  55db28377169afbfb6155eea138dcab1a1bf4468
> [security] Test and fix permissions for ARK NAA
>
> Should be only editable by managers
>

> diff --git a/test/testutils.py b/test/testutils.py
> --- a/test/testutils.py
> +++ b/test/testutils.py
> @@ -98,11 +98,12 @@ def seda_transfer(cnx, **kwargs):
>
>  def naa(cnx):
>      try:
>          return cnx.find('ArkNameAssigningAuthority').one()
>      except NoResultError:
> -        return cnx.create_entity('ArkNameAssigningAuthority', who=u'TEST', what=0)
> +        with cnx.security_enabled(False, False):
> +            return cnx.create_entity('ArkNameAssigningAuthority', who=u'TEST', what=0)
>
>

Can you explain this change? Wouldn't it be better to use a manager
account to create this entity in test?



More information about the saem-devel mailing list