mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Misc wording and orthotypography...
Co-Authored-By: Allan Nordhøy <epost@anotheragency.no>
This commit is contained in:
parent
7102c5d0ca
commit
2a5053b66b
4 changed files with 12 additions and 12 deletions
|
@ -177,7 +177,7 @@ else:
|
||||||
if key in ['redirected_urls', 'redirected_regex']:
|
if key in ['redirected_urls', 'redirected_regex']:
|
||||||
value = yaml.load(value)
|
value = yaml.load(value)
|
||||||
if key in ["unprotected_uris", "unprotected_regex", "protected_uris", "protected_regex"]:
|
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
|
settings[key] = value
|
||||||
else:
|
else:
|
||||||
raise ValueError("action should either be get, set or delete")
|
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" ...]]
|
# 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: 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 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:
|
# For example:
|
||||||
# / -> domain.tld/app
|
# / -> domain.tld/app
|
||||||
# /admin -> domain.tld/app/admin
|
# /admin -> domain.tld/app/admin
|
||||||
# domain.tld/app/api -> domain.tld/app/api
|
# 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:
|
# For example:
|
||||||
# re:/api/[A-Z]*$ -> domain.tld/app/api/[A-Z]*$
|
# re:/api/[A-Z]*$ -> domain.tld/app/api/[A-Z]*$
|
||||||
# re:domain.tld/app/api/[A-Z]*$ -> domain.tld/app/api/[A-Z]*$
|
# re:domain.tld/app/api/[A-Z]*$ -> domain.tld/app/api/[A-Z]*$
|
||||||
|
|
|
@ -230,7 +230,7 @@
|
||||||
"group_already_exist_on_system": "Group {group} already exists in the system group",
|
"group_already_exist_on_system": "Group {group} already exists in the system group",
|
||||||
"group_created": "Group '{group}' successfully created",
|
"group_created": "Group '{group}' successfully created",
|
||||||
"group_creation_failed": "Failed to create group {group}: {error}",
|
"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_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_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.",
|
"group_cannot_be_edited": "The group {group} cannot be edited manually.",
|
||||||
|
|
|
@ -146,11 +146,11 @@ def user_permission_update(operation_logger, permission, add=None, remove=None,
|
||||||
if "all_users" in new_allowed_groups:
|
if "all_users" in new_allowed_groups:
|
||||||
# FIXME : i18n
|
# FIXME : i18n
|
||||||
# FIXME : write a better explanation ?
|
# 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:
|
if "visitors" in new_allowed_groups:
|
||||||
# FIXME : i18n
|
# FIXME : i18n
|
||||||
# FIXME : write a better explanation ?
|
# 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
|
# Don't update LDAP if we update exactly the same values
|
||||||
if set(new_allowed_groups) == set(current_allowed_groups):
|
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:
|
Keyword argument:
|
||||||
permission -- Name of the permission (e.g. mail or nextcloud or wordpress.editors)
|
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 '/'.
|
Urls are assumed to be relative to the app domain/path if they start with '/'.
|
||||||
For example:
|
For example:
|
||||||
|
@ -276,7 +276,7 @@ def permission_create(operation_logger, permission, urls=None, sync_perm=True):
|
||||||
/admin -> domain.tld/app/admin
|
/admin -> domain.tld/app/admin
|
||||||
domain.tld/app/api -> domain.tld/app/api
|
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:
|
For example:
|
||||||
re:/api/[A-Z]*$ -> domain.tld/app/api/[A-Z]*$
|
re:/api/[A-Z]*$ -> domain.tld/app/api/[A-Z]*$
|
||||||
re:domain.tld/app/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:
|
Keyword argument:
|
||||||
permission -- Name of the permission (e.g. mail or nextcloud or wordpress.editors)
|
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)
|
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)
|
remove -- List of URLs to remove (c.f. permission_create for documentation about their format)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from yunohost.utils.ldap import _get_ldap_interface
|
from yunohost.utils.ldap import _get_ldap_interface
|
||||||
|
|
|
@ -180,7 +180,7 @@ def can_access_webpage(webpath, logged_as=None):
|
||||||
assert session.cookies
|
assert session.cookies
|
||||||
r = session.get(webpath, verify=False)
|
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)
|
return not r.url.startswith(sso_url)
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Reference in a new issue