Merge "Implement new option: session-timeout"

This commit is contained in:
Zuul 2019-02-21 00:58:21 +00:00 committed by Gerrit Code Review
commit 0edeceb80a
8 changed files with 38 additions and 0 deletions

View File

@ -49,6 +49,13 @@ options:
description: |
Directory where application will be accessible, relative to
http://$hostname/.
session-timeout:
type: int
default: 3600
description:
A method to supersede the token timeout with a shorter dashboard session
timeout in seconds. For example, if your token expires in 60 minutes, a
value of 1800 will log users out after 30 minutes.
default-role:
type: string
default: "Member"

View File

@ -205,6 +205,7 @@ class HorizonContext(OSContextGenerator):
'image_formats': config('image-formats'),
'api_result_limit': config('api-result-limit') or 1000,
'enable_fip_topology_check': config('enable-fip-topology-check'),
'session_timeout': config('session-timeout')
}
return ctxt

View File

@ -33,6 +33,9 @@ CSRF_COOKIE_SECURE = True
SESSION_COOKIE_SECURE = True
{% endif %}
# A method to supersede the token timeout with a shorter dashboard session
# timeout in seconds.
SESSION_TIMEOUT = {{ session_timeout }}
# Overrides for OpenStack API versions. Use this setting to force the
# OpenStack dashboard to use a specfic API version for a given service API.

View File

@ -51,6 +51,9 @@ CSRF_COOKIE_SECURE = True
SESSION_COOKIE_SECURE = True
{% endif %}
# A method to supersede the token timeout with a shorter dashboard session
# timeout in seconds.
SESSION_TIMEOUT = {{ session_timeout }}
# Overrides for OpenStack API versions. Use this setting to force the
# OpenStack dashboard to use a specific API version for a given service API.

View File

@ -50,6 +50,9 @@ CSRF_COOKIE_SECURE = True
SESSION_COOKIE_SECURE = True
{% endif %}
# A method to supersede the token timeout with a shorter dashboard session
# timeout in seconds.
SESSION_TIMEOUT = {{ session_timeout }}
# The absolute path to the directory where message files are collected.
# The message file must have a .json file extension. When the user logins to

View File

@ -50,6 +50,9 @@ CSRF_COOKIE_SECURE = True
SESSION_COOKIE_SECURE = True
{% endif %}
# A method to supersede the token timeout with a shorter dashboard session
# timeout in seconds.
SESSION_TIMEOUT = {{ session_timeout }}
# The absolute path to the directory where message files are collected.
# The message file must have a .json file extension. When the user logins to

View File

@ -50,6 +50,9 @@ CSRF_COOKIE_SECURE = True
SESSION_COOKIE_SECURE = True
{% endif %}
# A method to supersede the token timeout with a shorter dashboard session
# timeout in seconds.
SESSION_TIMEOUT = {{ session_timeout }}
# The absolute path to the directory where message files are collected.
# The message file must have a .json file extension. When the user logins to

View File

@ -164,6 +164,7 @@ class TestHorizonContexts(CharmTestCase):
"image_formats": '',
"api_result_limit": 1000,
"enable_fip_topology_check": True,
"session_timeout": 3600,
}
)
@ -192,6 +193,7 @@ class TestHorizonContexts(CharmTestCase):
"image_formats": '',
"api_result_limit": 1000,
"enable_fip_topology_check": True,
"session_timeout": 3600,
}
)
@ -220,6 +222,7 @@ class TestHorizonContexts(CharmTestCase):
"image_formats": '',
"api_result_limit": 1000,
"enable_fip_topology_check": True,
"session_timeout": 3600,
}
)
@ -248,6 +251,7 @@ class TestHorizonContexts(CharmTestCase):
"image_formats": '',
"api_result_limit": 1000,
"enable_fip_topology_check": True,
"session_timeout": 3600,
}
)
@ -277,6 +281,7 @@ class TestHorizonContexts(CharmTestCase):
"image_formats": '',
"api_result_limit": 1000,
"enable_fip_topology_check": True,
"session_timeout": 3600,
}
)
@ -309,6 +314,7 @@ class TestHorizonContexts(CharmTestCase):
"image_formats": '',
"api_result_limit": 1000,
"enable_fip_topology_check": True,
"session_timeout": 3600,
}
)
@ -337,6 +343,7 @@ class TestHorizonContexts(CharmTestCase):
"image_formats": '',
"api_result_limit": 1000,
"enable_fip_topology_check": True,
"session_timeout": 3600,
}
)
@ -365,6 +372,7 @@ class TestHorizonContexts(CharmTestCase):
"image_formats": '',
"api_result_limit": 1000,
"enable_fip_topology_check": True,
"session_timeout": 3600,
}
)
@ -398,6 +406,7 @@ class TestHorizonContexts(CharmTestCase):
"image_formats": '',
"api_result_limit": 1000,
"enable_fip_topology_check": True,
"session_timeout": 3600,
}
)
@ -426,6 +435,7 @@ class TestHorizonContexts(CharmTestCase):
"image_formats": '',
"api_result_limit": 1000,
"enable_fip_topology_check": True,
"session_timeout": 3600,
}
)
@ -454,6 +464,7 @@ class TestHorizonContexts(CharmTestCase):
"image_formats": '',
"api_result_limit": 1000,
"enable_fip_topology_check": True,
"session_timeout": 3600,
}
)
@ -483,6 +494,7 @@ class TestHorizonContexts(CharmTestCase):
"image_formats": '',
"api_result_limit": 1000,
"enable_fip_topology_check": True,
"session_timeout": 3600,
}
)
@ -512,6 +524,7 @@ class TestHorizonContexts(CharmTestCase):
"image_formats": '',
"api_result_limit": 1000,
"enable_fip_topology_check": True,
"session_timeout": 3600,
}
)
@ -541,6 +554,7 @@ class TestHorizonContexts(CharmTestCase):
"image_formats": 'iso qcow2 raw',
"api_result_limit": 1000,
"enable_fip_topology_check": True,
"session_timeout": 3600,
}
)
@ -570,6 +584,7 @@ class TestHorizonContexts(CharmTestCase):
"image_formats": '',
"api_result_limit": 1000,
"enable_fip_topology_check": False,
"session_timeout": 3600,
}
)