Skip to content

Commit

Permalink
Use excluded_plugins.json visibility setting when defining hidden and…
Browse files Browse the repository at this point in the history
… public plugins (#941)
  • Loading branch information
richaagarwal authored Mar 16, 2023
1 parent 9a04950 commit 882072c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/api/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,10 @@ def update_cache():
excluded_plugins = get_updated_plugin_exclusion(plugins_metadata)
visibility_plugins = {"public": {}, "hidden": {}}
for plugin, version in plugins.items():
visibility = plugins_metadata[plugin].get('visibility', 'public')
if plugin in excluded_plugins:
visibility = excluded_plugins[plugin]
else:
visibility = plugins_metadata[plugin].get('visibility', 'public')
if visibility in visibility_plugins:
visibility_plugins[visibility][plugin] = version

Expand Down Expand Up @@ -271,6 +274,7 @@ def get_updated_plugin_exclusion(plugins_metadata):
public: fully visible (default)
hidden: plugin page exists, but doesn't show up in search listings
disabled: no plugin page created, does not show up in search listings
blocked: no plugin page created, does not show up in search listings
:param plugins_metadata: plugin metadata containing visibility information
:return: updated exclusion list
Expand Down

0 comments on commit 882072c

Please sign in to comment.