hide requests

This commit is contained in:
Montana 2019-01-09 13:22:32 -05:00
parent 08806eed24
commit c2a597d98b
6 changed files with 3 additions and 36 deletions

View File

@ -66,9 +66,7 @@ def make_app(config):
app.register_blueprint(workspace_routes)
app.register_blueprint(task_orders_bp)
app.register_blueprint(user_routes)
if app.config.get("REQUESTS_WORKFLOW"):
app.register_blueprint(requests_bp)
app.register_blueprint(requests_bp)
if ENV != "prod":
app.register_blueprint(dev_routes)
@ -134,7 +132,6 @@ def map_config(config):
"REQUIRE_CRLS": config.getboolean("default", "REQUIRE_CRLS"),
"RQ_REDIS_URL": config["default"]["REDIS_URI"],
"RQ_QUEUES": [config["default"]["RQ_QUEUES"]],
"REQUESTS_WORKFLOW": config.getboolean("default", "REQUESTS_WORKFLOW"),
}

View File

@ -48,19 +48,13 @@ def helpdocs(doc=None):
def home():
user = g.current_user
resource_index = (
"requests.requests_index"
if app.config.get("REQUESTS_WORKFLOW")
else "workspaces.workspaces"
)
if user.atat_role_name == "ccpo":
return redirect(url_for(resource_index))
return redirect(url_for("requests.requests_index"))
num_workspaces = len(user.workspace_roles)
if num_workspaces == 0:
return redirect(url_for(resource_index))
return redirect(url_for("requests.requests_index"))
elif num_workspaces == 1:
workspace_role = user.workspace_roles[0]
workspace_id = workspace_role.workspace.id

View File

@ -25,4 +25,3 @@ SESSION_USE_SIGNER = True
STORAGE_CONTAINER=uploads
STORAGE_PROVIDER=LOCAL
WTF_CSRF_ENABLED = true
REQUESTS_WORKFLOW=false

View File

@ -15,9 +15,6 @@
JEDI Cloud provides commercial Infrastructure as a Service (IaaS) and Platform as a Service (PaaS) offerings to support DoD business and mission operations.<br>
<b>Anyone with a DoD mission may use JEDI</b>.
</p>
{% if config.get("REQUESTS_WORKFLOW") %}
<a class="usa-button" href="{{ url_for('requests.requests_form_new', screen=1) }}"><span>New JEDI Request</span></a>
{% endif %}
<h2>Five Steps to the JEDI Cloud</h2>
@ -29,9 +26,6 @@
<h3 class="h4">Complete a JEDI Cloud Access Request</h3>
<p>
A JEDI Cloud Access Request will inform the the Cloud Computing Program Office (CCPO) about your intention to use JEDI's commercial cloud services and provide the preliminary information needed to grant access.
{% if config.get("REQUESTS_WORKFLOW") %}
Any DoD employee with a CAC may initiate this request. <a class="icon-link" href="{{ url_for('requests.requests_form_new', screen=1) }}">Start a Request</a>
{% endif %}
</p>
</li>
<li>

View File

@ -2,17 +2,6 @@
<div class="global-navigation sidenav {% if workspace %}global-navigation__context--workspace{% endif %}">
<ul>
{% if config.get("REQUESTS_WORKFLOW") %}
{{ SidenavItem("Requests",
href="/requests",
icon="document",
active=g.matchesPath('/requests'),
subnav=[
{"label":"New Request", "href":url_for("requests.requests_form_new", screen=1), "icon": "plus", "active": g.matchesPath('/requests/new')},
]
) }}
{% endif %}
{{ SidenavItem("New Task Order",
href=url_for("task_orders.new", screen=1),
icon="plus",

View File

@ -53,12 +53,6 @@
</p>
{% endif %}
{% if config.get("REQUESTS_WORKFLOW") %}
<a href="{{ url_for('requests.requests_form_new', screen=1) }}" class='menu__button usa-button'>
{{ "navigation.topbar.request_workspace_link_text" | translate }}
</a>
{% endif %}
</div>
</template>
</div>