Merge "Optional removal of V2 openrc file"
This commit is contained in:
commit
70866a308c
|
@ -865,6 +865,16 @@ This SESSION_TIMEOUT is a method to supercede the token timeout with a shorter
|
||||||
horizon session timeout (in seconds). So if your token expires in 60 minutes,
|
horizon session timeout (in seconds). So if your token expires in 60 minutes,
|
||||||
a value of 1800 will log users out after 30 minutes.
|
a value of 1800 will log users out after 30 minutes.
|
||||||
|
|
||||||
|
SHOW_KEYSTONE_V2_RC
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
.. versionadded:: 13.0.0(Queens)
|
||||||
|
|
||||||
|
Default: ``True``
|
||||||
|
|
||||||
|
Controls whether the keystone v2 openrc file is accessable from the user
|
||||||
|
menu and the api access panel.
|
||||||
|
|
||||||
THEME_COLLECTION_DIR
|
THEME_COLLECTION_DIR
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,7 @@ def openstack(request):
|
||||||
hmac_keys, parent_id=index_view_id)
|
hmac_keys, parent_id=index_view_id)
|
||||||
|
|
||||||
context['JS_CATALOG'] = get_js_catalog(conf)
|
context['JS_CATALOG'] = get_js_catalog(conf)
|
||||||
|
context['SHOW_KEYSTONE_V2_RC'] = settings.SHOW_KEYSTONE_V2_RC
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
from django.template.defaultfilters import title
|
from django.template.defaultfilters import title
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
@ -70,6 +71,9 @@ class DownloadOpenRCv2(tables.LinkAction):
|
||||||
icon = "download"
|
icon = "download"
|
||||||
url = "horizon:project:api_access:openrcv2"
|
url = "horizon:project:api_access:openrcv2"
|
||||||
|
|
||||||
|
def allowed(self, request, datum=None):
|
||||||
|
return settings.SHOW_KEYSTONE_V2_RC
|
||||||
|
|
||||||
|
|
||||||
class ViewCredentials(tables.LinkAction):
|
class ViewCredentials(tables.LinkAction):
|
||||||
name = "view_credentials"
|
name = "view_credentials"
|
||||||
|
|
|
@ -108,6 +108,11 @@ WEBROOT = '/'
|
||||||
# or None. Set to None explicitly if you want to deactivate the console.
|
# or None. Set to None explicitly if you want to deactivate the console.
|
||||||
#CONSOLE_TYPE = "AUTO"
|
#CONSOLE_TYPE = "AUTO"
|
||||||
|
|
||||||
|
# Toggle showing the openrc file for Keystone V2.
|
||||||
|
# If set to false the link will be removed from the user dropdown menu
|
||||||
|
# and the API Access page
|
||||||
|
#SHOW_KEYSTONE_V2_RC = True
|
||||||
|
|
||||||
# If provided, a "Report Bug" link will be displayed in the site header
|
# If provided, a "Report Bug" link will be displayed in the site header
|
||||||
# which links to the value of this setting (ideally a URL containing
|
# which links to the value of this setting (ideally a URL containing
|
||||||
# information on how to report issues).
|
# information on how to report issues).
|
||||||
|
|
|
@ -322,6 +322,8 @@ CSRF_COOKIE_AGE = None
|
||||||
|
|
||||||
COMPRESS_OFFLINE_CONTEXT = 'horizon.themes.offline_context'
|
COMPRESS_OFFLINE_CONTEXT = 'horizon.themes.offline_context'
|
||||||
|
|
||||||
|
SHOW_KEYSTONE_V2_RC = True
|
||||||
|
|
||||||
# Dictionary of currently available angular features
|
# Dictionary of currently available angular features
|
||||||
ANGULAR_FEATURES = {
|
ANGULAR_FEATURES = {
|
||||||
'images_panel': True,
|
'images_panel': True,
|
||||||
|
|
|
@ -34,12 +34,14 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li>
|
{% if SHOW_KEYSTONE_V2_RC %}
|
||||||
<a href="{% url 'horizon:project:api_access:openrcv2' %}">
|
<li>
|
||||||
<span class="fa fa-download"></span>
|
<a href="{% url 'horizon:project:api_access:openrcv2' %}">
|
||||||
{% trans "OpenStack RC File v2" %}
|
<span class="fa fa-download"></span>
|
||||||
</a>
|
{% trans "OpenStack RC File v2" %}
|
||||||
</li>
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'horizon:project:api_access:openrc' %}">
|
<a href="{% url 'horizon:project:api_access:openrc' %}">
|
||||||
<span class="fa fa-download"></span>
|
<span class="fa fa-download"></span>
|
||||||
|
@ -66,4 +68,3 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue