Change default value for protected permission to 'false'

This commit is contained in:
Josué Tille 2020-04-29 13:42:14 +02:00
parent 9757ef2ddd
commit abe421caa8
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
3 changed files with 3 additions and 3 deletions

View file

@ -193,7 +193,7 @@ ynh_webpath_register () {
# | Default is false (for the permission different than 'main').
# | arg: -P, protected= - (optional) Define if this permission is protected. If it is protected the administrator
# | won't be able to add or remove the visitors group of this permission.
# | By default it's 'true' (for the permission different than 'main').
# | By default it's 'false'
#
# If provided, 'url' or 'additional_urls' is assumed to be relative to the app domain/path if they
# start with '/'. For example:

View file

@ -260,7 +260,7 @@ def user_permission_info(permission):
def permission_create(operation_logger, permission, allowed=None,
url=None, additional_urls=None, auth_header=True,
label=None, show_tile=False,
protected=True, sync_perm=True):
protected=False, sync_perm=True):
"""
Create a new permission for a specific application

View file

@ -352,7 +352,7 @@ def test_permission_create_extra(mocker):
# all_users is only enabled by default on .main perms
assert "all_users" not in res['site.test']['allowed']
assert res['site.test']['corresponding_users'] == []
assert res['site.test']['protected'] == True
assert res['site.test']['protected'] == False
def test_permission_create_with_specific_user():