Skip to content

Commit

Permalink
Add setup url config
Browse files Browse the repository at this point in the history
  • Loading branch information
gnarula committed Feb 16, 2015
1 parent 13b930b commit 75305e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
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

0 comments on commit 75305e8

Please sign in to comment.