mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Manage skipped, unprotected uris in root path case
This commit is contained in:
parent
fe5ca24222
commit
d5c61f2d27
2 changed files with 7 additions and 6 deletions
|
@ -464,6 +464,7 @@
|
|||
"migration_0011_update_LDAP_schema": "Updating LDAP schema…",
|
||||
"migration_0011_failed_to_remove_stale_object": "Could not remove stale object {dn}: {error}",
|
||||
"migration_0015_add_new_attributes_in_ldap": "Add new attributes for permissions in LDAP database",
|
||||
"migration_0015_migrate_old_app_settings": "Migrate old apps settings 'skipped_uris', 'unprotected_uris', 'protected_uris' in permissions system.",
|
||||
"migrations_already_ran": "Those migrations are already done: {ids}",
|
||||
"migrations_cant_reach_migration_file": "Could not access migrations files at the path '%s'",
|
||||
"migrations_dependencies_not_satisfied": "Run these migrations: '{dependencies_id}', before migration {id}.",
|
||||
|
|
|
@ -92,12 +92,12 @@ class MyMigration(Migration):
|
|||
return s.split(',') if s else []
|
||||
|
||||
for app in apps:
|
||||
skipped_urls = [_sanitized_absolute_url(uri) for uri in app_setting(app, 'skipped_uris')]
|
||||
skipped_urls += ['re:' + regex for regex in app_setting(app, 'skipped_regex')]
|
||||
unprotected_urls = [_sanitized_absolute_url(uri) for uri in app_setting(app, 'unprotected_uris')]
|
||||
unprotected_urls += ['re:' + regex for regex in app_setting(app, 'unprotected_regex')]
|
||||
protected_urls = [_sanitized_absolute_url(uri) for uri in app_setting(app, 'protected_uris')]
|
||||
protected_urls += ['re:' + regex for regex in app_setting(app, 'protected_regex')]
|
||||
skipped_urls = [_sanitized_absolute_url(uri) for uri in _get_setting(app, 'skipped_uris') if uri != '/']
|
||||
skipped_urls += ['re:' + regex for regex in _get_setting(app, 'skipped_regex')]
|
||||
unprotected_urls = [_sanitized_absolute_url(uri) for uri in _get_setting(app, 'unprotected_uris') if uri != '/']
|
||||
unprotected_urls += ['re:' + regex for regex in _get_setting(app, 'unprotected_regex')]
|
||||
protected_urls = [_sanitized_absolute_url(uri) for uri in _get_setting(app, 'protected_uris') if uri != '/']
|
||||
protected_urls += ['re:' + regex for regex in _get_setting(app, 'protected_regex')]
|
||||
|
||||
if skipped_urls != []:
|
||||
permission_create(app+".legacy_skipped_uris", additional_urls=skipped_urls,
|
||||
|
|
Loading…
Add table
Reference in a new issue