Optional removal of V2 openrc file
* Setting 'SHOW_V2_KEYSTONE_RC' added and will control whether or not user's are able to see links for the V2 rc file on both the API Access panel and the user menu. Change-Id: I454fcf578dd8c4d2b9b52c3a9e5426b85e5298b5
This commit is contained in:
parent
d46246d476
commit
b0e696cf9a
@ -844,6 +844,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,
|
||||
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
|
||||
--------------------
|
||||
|
||||
|
@ -97,6 +97,7 @@ def openstack(request):
|
||||
hmac_keys, parent_id=index_view_id)
|
||||
|
||||
context['JS_CATALOG'] = get_js_catalog(conf)
|
||||
context['SHOW_KEYSTONE_V2_RC'] = settings.SHOW_KEYSTONE_V2_RC
|
||||
|
||||
return context
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.conf import settings
|
||||
from django.template.defaultfilters import title
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
@ -70,6 +71,9 @@ class DownloadOpenRCv2(tables.LinkAction):
|
||||
icon = "download"
|
||||
url = "horizon:project:api_access:openrcv2"
|
||||
|
||||
def allowed(self, request, datum=None):
|
||||
return settings.SHOW_KEYSTONE_V2_RC
|
||||
|
||||
|
||||
class ViewCredentials(tables.LinkAction):
|
||||
name = "view_credentials"
|
||||
|
@ -108,6 +108,11 @@ WEBROOT = '/'
|
||||
# or None. Set to None explicitly if you want to deactivate the console.
|
||||
#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
|
||||
# which links to the value of this setting (ideally a URL containing
|
||||
# information on how to report issues).
|
||||
|
@ -323,6 +323,8 @@ CSRF_COOKIE_AGE = None
|
||||
|
||||
COMPRESS_OFFLINE_CONTEXT = 'horizon.themes.offline_context'
|
||||
|
||||
SHOW_KEYSTONE_V2_RC = True
|
||||
|
||||
# Dictionary of currently available angular features
|
||||
ANGULAR_FEATURES = {
|
||||
'images_panel': True,
|
||||
|
@ -34,12 +34,14 @@
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="{% url 'horizon:project:api_access:openrcv2' %}">
|
||||
<span class="fa fa-download"></span>
|
||||
{% trans "OpenStack RC File v2" %}
|
||||
</a>
|
||||
</li>
|
||||
{% if SHOW_KEYSTONE_V2_RC %}
|
||||
<li>
|
||||
<a href="{% url 'horizon:project:api_access:openrcv2' %}">
|
||||
<span class="fa fa-download"></span>
|
||||
{% trans "OpenStack RC File v2" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="{% url 'horizon:project:api_access:openrc' %}">
|
||||
<span class="fa fa-download"></span>
|
||||
@ -66,4 +68,3 @@
|
||||
{% else %}
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user