Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setup url config #1070

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions modules/s3cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ def __init__(self):
self.supply = Storage()
self.search = Storage()
self.security = Storage()
self.setup = Storage()
self.sync = Storage()
self.ui = Storage()
self.vulnerability = Storage()
Expand Down Expand Up @@ -1970,6 +1971,14 @@ def get_search_filter_manager_load(self):
""" Text for saved filter load-button """
return self.search.get("filter_manager_load", None)

# =========================================================================
# Setup
#
def get_setup_url(self):
""" URL for Setup Coapp """

return self.setup.get("url", None)

# =========================================================================
# Sync
#
Expand Down
3 changes: 3 additions & 0 deletions modules/s3menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ def menu_admin(cls, **attr):
check=translate),
MM("Test Results", f="result"),
)
setup_url = settings.get_setup_url()
if setup_url:
menu_admin.append(MM("Setup Coapp", url=setup_url))
elif s3_has_role("ORG_ADMIN"):
menu_admin = MM(name_nice, c="admin", f="user", **attr)()
else:
Expand Down