Misc wording and orthotypography...

Co-Authored-By: Allan Nordhøy <epost@anotheragency.no>
This commit is contained in:
Alexandre Aubin 2019-09-21 13:32:40 +02:00 committed by GitHub
parent 7102c5d0ca
commit 2a5053b66b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 12 deletions

View file

@ -177,7 +177,7 @@ else:
if key in ['redirected_urls', 'redirected_regex']:
value = yaml.load(value)
if key in ["unprotected_uris", "unprotected_regex", "protected_uris", "protected_regex"]:
logger.warning("/!\\ Packagers ! This app is using the legacy permission system. Please delete these legacy settings and use the new helpers ynh_permission_{create,urls,update,delete} and the 'visitors' group to manage public/private access.")
logger.warning("/!\\ Packagers! This app is using the legacy permission system. Please delete these legacy settings and use the new helpers 'ynh_permission_{create,urls,update,delete}' and the 'visitors' group to manage public/private access.")
settings[key] = value
else:
raise ValueError("action should either be get, set or delete")
@ -237,15 +237,15 @@ ynh_webpath_register () {
# usage: ynh_permission_create --permission "permission" [--urls "url" ["url" ...]]
# | arg: permission - the name for the permission (by default a permission named "main" already exist)
# | arg: urls - (optional) a list of FULL urls for the permission (e.g. domain.tld/apps/admin)
# | arg: urls - (optional) a list of urls to specify for the permission.
# | arg: urls - (optional) a list of URLs to specify for the permission.
#
# Urls are assumed to be relative to the app domain/path if they start with '/'.
# URLs are assumed to be relative to the app domain/path if they start with '/'.
# For example:
# / -> domain.tld/app
# /admin -> domain.tld/app/admin
# domain.tld/app/api -> domain.tld/app/api
#
# Urls can be treated as regexes when they start with "re:".
# URLs can be treated as regexes when they start with "re:".
# For example:
# re:/api/[A-Z]*$ -> domain.tld/app/api/[A-Z]*$
# re:domain.tld/app/api/[A-Z]*$ -> domain.tld/app/api/[A-Z]*$

View file

@ -230,7 +230,7 @@
"group_already_exist_on_system": "Group {group} already exists in the system group",
"group_created": "Group '{group}' successfully created",
"group_creation_failed": "Failed to create group {group}: {error}",
"group_cannot_edit_all_users": "The group 'all_users' cannot be edited manually. It is a special group meant to contain all users registered in Yunohost",
"group_cannot_edit_all_users": "The group 'all_users' cannot be edited manually. It is a special group meant to contain all users registered in YunoHost",
"group_cannot_edit_visitors": "The group 'visitors' cannot be edited manually. It is a special group representing anonymous visitors",
"group_cannot_edit_primary_group": "The group '{group}' cannot be edited manually. It is the primary group meant to contain only one specific user.",
"group_cannot_be_edited": "The group {group} cannot be edited manually.",

View file

@ -146,11 +146,11 @@ def user_permission_update(operation_logger, permission, add=None, remove=None,
if "all_users" in new_allowed_groups:
# FIXME : i18n
# FIXME : write a better explanation ?
logger.warning("This permission is currently enabled for all users in addition to other groups. You probably want to either remove the 'all_users' permission or remove the other groups currently allowed.")
logger.warning("This permission is currently granted to all users in addition to other groups. You probably want to either remove the 'all_users' permission or remove the other groups it is currently granted to.")
if "visitors" in new_allowed_groups:
# FIXME : i18n
# FIXME : write a better explanation ?
logger.warning("This permission is currently enabled for visitors in addition to other groups. You probably want to either remove the 'visitors' permission or remove the other groups currently allowed.")
logger.warning("This permission is currently granted to visitors in addition to other groups. You probably want to either remove the 'visitors' permission or remove the other groups it is currently granted to.")
# Don't update LDAP if we update exactly the same values
if set(new_allowed_groups) == set(current_allowed_groups):
@ -268,7 +268,7 @@ def permission_create(operation_logger, permission, urls=None, sync_perm=True):
Keyword argument:
permission -- Name of the permission (e.g. mail or nextcloud or wordpress.editors)
urls -- list of urls to specify for the permission.
urls -- list of URLs to specify for the permission.
Urls are assumed to be relative to the app domain/path if they start with '/'.
For example:
@ -276,7 +276,7 @@ def permission_create(operation_logger, permission, urls=None, sync_perm=True):
/admin -> domain.tld/app/admin
domain.tld/app/api -> domain.tld/app/api
Urls can be later treated as regexes when they start with "re:".
URLs can be later treated as regexes when they start with "re:".
For example:
re:/api/[A-Z]*$ -> domain.tld/app/api/[A-Z]*$
re:domain.tld/app/api/[A-Z]*$ -> domain.tld/app/api/[A-Z]*$
@ -337,8 +337,8 @@ def permission_urls(operation_logger, permission, add=None, remove=None, sync_pe
Keyword argument:
permission -- Name of the permission (e.g. mail or nextcloud or wordpress.editors)
add -- List of urls to add (c.f. permission_create for documentation about their format)
remove -- List of urls to remove (c.f. permission_create for documentation about their format)
add -- List of URLs to add (c.f. permission_create for documentation about their format)
remove -- List of URLs to remove (c.f. permission_create for documentation about their format)
"""
from yunohost.utils.ldap import _get_ldap_interface

View file

@ -180,7 +180,7 @@ def can_access_webpage(webpath, logged_as=None):
assert session.cookies
r = session.get(webpath, verify=False)
# If we can't access it, we got redirected to the sso
# If we can't access it, we got redirected to the SSO
return not r.url.startswith(sso_url)
#