diff --git a/en/asgardeo/hooks.py b/en/asgardeo/hooks.py index f2e5708532..59aa000002 100644 --- a/en/asgardeo/hooks.py +++ b/en/asgardeo/hooks.py @@ -16,7 +16,7 @@ def parse_json(file_path): json_file.close() return features_to_remove -files_to_remove = parse_json(os.path.join(os.getcwd(), 'features.json')) +files_to_remove = parse_json(os.path.join(os.getcwd(), '../features.json')) def on_files(files, config): if os.getenv("ENABLE_HOOKS") == "true": diff --git a/en/asgardeo/features.json b/en/features.json similarity index 100% rename from en/asgardeo/features.json rename to en/features.json diff --git a/en/identity-server/7.0.0/hooks.py b/en/identity-server/7.0.0/hooks.py new file mode 100644 index 0000000000..ce1c94e3a4 --- /dev/null +++ b/en/identity-server/7.0.0/hooks.py @@ -0,0 +1,26 @@ +import os +import json +from mkdocs.structure.nav import Section, Page, Link + +def parse_json(file_path): + features_to_remove = {"feature": {}, "page": []} + with open(file_path, 'r') as json_file: + parse_data = json.load(json_file) + for feature, details in parse_data.items(): + enabled = details['enabled'] + page = details['page'] + features_to_remove['feature'][feature] = enabled + + if not enabled: + features_to_remove['page'].extend(page) + json_file.close() + return features_to_remove + +files_to_remove = parse_json(os.path.join(os.getcwd(), '../../features.json')) + +def on_config(config): + + for feature, enabled in files_to_remove['feature'].items(): + config[feature] = True + + return config diff --git a/en/identity-server/7.0.0/mkdocs.yml b/en/identity-server/7.0.0/mkdocs.yml index 00512da79e..ece47ba5d0 100644 --- a/en/identity-server/7.0.0/mkdocs.yml +++ b/en/identity-server/7.0.0/mkdocs.yml @@ -23,6 +23,9 @@ extra: base_path: /en/7.0.0 is_version: 7.0.0 +hooks: + - hooks.py + plugins: - search: indexing: "full" diff --git a/en/identity-server/next/hooks.py b/en/identity-server/next/hooks.py new file mode 100644 index 0000000000..ed2d4e13a1 --- /dev/null +++ b/en/identity-server/next/hooks.py @@ -0,0 +1,26 @@ +import os +import json +from mkdocs.structure.nav import Section, Page, Link + +def parse_json(file_path): + features_to_remove = {"feature": {}, "page": []} + with open(file_path, 'r') as json_file: + parse_data = json.load(json_file) + for feature, details in parse_data.items(): + enabled = details['enabled'] + page = details['page'] + features_to_remove['feature'][feature] = enabled + + if not enabled: + features_to_remove['page'].extend(page) + json_file.close() + return features_to_remove + +files_to_remove = parse_json(os.path.join(os.getcwd(), '../../features.json')) + +def on_config(config): + + for feature, enabled in files_to_remove['feature'].items(): + config[feature] = True + + return config \ No newline at end of file diff --git a/en/identity-server/next/mkdocs.yml b/en/identity-server/next/mkdocs.yml index 914554cd7d..27d16fc76c 100644 --- a/en/identity-server/next/mkdocs.yml +++ b/en/identity-server/next/mkdocs.yml @@ -23,6 +23,9 @@ extra: base_path: /en/next is_version: next +hooks: + - hooks.py + plugins: - search: indexing: "full" diff --git a/en/includes/guides/users/attributes/manage-attributes.md b/en/includes/guides/users/attributes/manage-attributes.md index e116ba53dd..96c932e05d 100644 --- a/en/includes/guides/users/attributes/manage-attributes.md +++ b/en/includes/guides/users/attributes/manage-attributes.md @@ -126,7 +126,7 @@ To delete an attribute: Only custom attributes can be deleted. -{% if product_name == "WSO2 Identity Server" or (product_name == "Asgardeo" and unique_attributes) %} +{% if unique_attributes %} ## Assign multiple email addresses and mobile numbers to a user {{ product_name }} allows users to associate multiple email addresses and mobile numbers with their profiles. For users with multiple values, they may also select a primary email address and a primary mobile number.