# retrieve session for request
# We allow some requests to use the ADMIN user account
- if manifold_query.get_from() == 'local:user' and manifold_query.get_action() == 'create':
+ if (manifold_query.get_from() == 'local:user' and manifold_query.get_action() == 'create') or (manifold_query.get_from() == 'local:platform' and manifold_query.get_action() == 'get'):
print "W: Used hardcoded demo account for admin queries"
manifold_api_session_auth = {'AuthMethod': 'password', 'Username': 'demo', 'AuthString': 'demo'}
else:
result=deepcopy(standard_topmenu_items)
result.append({'label':'My Account', 'href': '/portal/account/'})
result.append({ 'label':'Request a slice', 'href': '/portal/slice_request/'})
- result.append({'label':'Contact Support', 'href': '/portal/contact/'})
else:
result = []
result.append({'label':'Home', 'href': '/login'})
result.append({ 'label':'Register', 'href': '/portal/register/'})
- result.append({'label':'Contact Support', 'href': '/portal/contact/'})
result.append({'label':'Platforms', 'href': '/portal/platforms/'})
+ result.append({'label':'Contact Support', 'href': '/portal/contact/'})
for d in result:
#if d['label'].lower()find(current)>=0: d['is_active']=True
if d['label'] == current: d['is_active']=True
def get_context_data(self, **kwargs):
page = Page(self.request)
- network_query = Query().get('local:platform').select('platform','platform_longname','gateway_type')
+ network_query = Query().get('local:platform').filter_by('disabled', '==', '0').select('platform','platform_longname','gateway_type')
page.enqueue_query(network_query)
page.expose_js_metadata()