User needs to log in messages.

When a user tries to access a page and they are
not logged in, the message needs to be about
authentication, NOT authorization as it was before
this change. Needing to log in has nothing to do
with permissions and the messaging needs to
reflect that.

Fixes Bug #965810

Change-Id: Ic9de135d4d3d8e7b19524cd100a3fe7ea027e1f4
This commit is contained in:
John Postlethwait 2012-03-26 17:52:15 -07:00
parent 4653061403
commit c1b05e9bd8
17 changed files with 168 additions and 100 deletions

View File

@ -26,7 +26,7 @@ import functools
from django.utils.decorators import available_attrs
from django.utils.translation import ugettext as _
from horizon.exceptions import NotAuthorized, NotFound
from horizon.exceptions import NotAuthorized, NotFound, NotAuthenticated
def _current_component(view_func, dashboard=None, panel=None):
@ -44,19 +44,16 @@ def _current_component(view_func, dashboard=None, panel=None):
def require_auth(view_func):
""" Performs user authentication check.
Similar to Django's `login_required` decorator, except that this
throws NotAuthorized exception if the user is not signed-in.
Raises a :exc:`~horizon.exceptions.NotAuthorized` exception if the
user is not authenticated.
Similar to Django's `login_required` decorator, except that this throws
:exc:`~horizon.exceptions.NotAuthenticated` exception if the user is not
signed-in.
"""
@functools.wraps(view_func, assigned=available_attrs(view_func))
def dec(request, *args, **kwargs):
if request.user.is_authenticated():
return view_func(request, *args, **kwargs)
raise NotAuthorized(_("You are not authorized to access %s")
% request.path)
raise NotAuthenticated(_("Please log in to continue."))
return dec

View File

@ -63,6 +63,17 @@ class NotAuthorized(HorizonException):
status_code = 401
class NotAuthenticated(HorizonException):
"""
Raised when a user is trying to make requests and they are not logged in.
The included :class:`~horizon.middleware.HorizonMiddleware` catches
``NotAuthenticated`` and handles it gracefully by displaying an error
message and redirecting the user to a login page.
"""
status_code = 403
class NotFound(HorizonException):
""" Generic error to replace all "Not Found"-type API errors. """
status_code = 404

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: openstack-dashboard\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-25 13:51-0700\n"
"POT-Creation-Date: 2012-03-26 17:59-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -22,16 +22,20 @@ msgstr ""
msgid "Other"
msgstr ""
#: decorators.py:58 decorators.py:92
#: decorators.py:56
msgid "Please log in to continue."
msgstr ""
#: decorators.py:89
#, python-format
msgid "You are not authorized to access %s"
msgstr ""
#: decorators.py:133
#: decorators.py:130
msgid "The services for this view are not available."
msgstr ""
#: exceptions.py:198
#: exceptions.py:209
msgid "Unauthorized. Please try logging in again."
msgstr ""
@ -182,7 +186,7 @@ msgid "Unable to disassociate floating IP."
msgstr ""
#: dashboards/nova/access_and_security/floating_ips/tables.py:91
#: dashboards/nova/instances_and_volumes/instances/tables.py:224
#: dashboards/nova/instances_and_volumes/instances/tables.py:228
#: dashboards/syspanel/instances/tables.py:52
msgid "IP Address"
msgstr ""
@ -548,7 +552,7 @@ msgstr ""
#: dashboards/nova/containers/tables.py:107
#: dashboards/nova/containers/tables.py:171
#: dashboards/nova/instances_and_volumes/instances/tables.py:225
#: dashboards/nova/instances_and_volumes/instances/tables.py:229
#: dashboards/nova/instances_and_volumes/volumes/tables.py:113
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:30
#: dashboards/nova/templates/nova/instances_and_volumes/volumes/_detail_overview.html:29
@ -743,7 +747,7 @@ msgid "Image Name"
msgstr ""
#: dashboards/nova/images_and_snapshots/images/tables.py:89
#: dashboards/nova/instances_and_volumes/instances/tables.py:228
#: dashboards/nova/instances_and_volumes/instances/tables.py:232
#: dashboards/nova/instances_and_volumes/volumes/tables.py:116
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:15
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:18
@ -897,7 +901,7 @@ msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:69
#: dashboards/nova/instances_and_volumes/instances/tables.py:84
#: dashboards/nova/instances_and_volumes/instances/tables.py:112
#: dashboards/nova/instances_and_volumes/instances/tables.py:242
#: dashboards/nova/instances_and_volumes/instances/tables.py:246
#: dashboards/syspanel/instances/panel.py:28
#: dashboards/syspanel/instances/tables.py:70
#: dashboards/syspanel/projects/forms.py:115
@ -972,17 +976,17 @@ msgstr ""
msgid "Not available"
msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:223
#: dashboards/nova/instances_and_volumes/instances/tables.py:227
#: dashboards/syspanel/instances/tables.py:51 usage/tables.py:46
msgid "Instance Name"
msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:232
#: dashboards/nova/instances_and_volumes/instances/tables.py:236
#: dashboards/syspanel/instances/tables.py:60
msgid "Task"
msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:238
#: dashboards/nova/instances_and_volumes/instances/tables.py:242
#: dashboards/syspanel/instances/tables.py:66
msgid "Power State"
msgstr ""
@ -2166,7 +2170,7 @@ msgstr ""
msgid "Login"
msgstr ""
#: templates/horizon/common/_data_table.html:29
#: templates/horizon/common/_data_table.html:31
#, python-format
msgid "Displaying %(counter)s item"
msgid_plural "Displaying %(counter)s items"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: openstack-dashboard\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-25 13:51-0700\n"
"POT-Creation-Date: 2012-03-26 17:59-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -22,16 +22,20 @@ msgstr ""
msgid "Other"
msgstr ""
#: decorators.py:58 decorators.py:92
#: decorators.py:56
msgid "Please log in to continue."
msgstr ""
#: decorators.py:89
#, python-format
msgid "You are not authorized to access %s"
msgstr ""
#: decorators.py:133
#: decorators.py:130
msgid "The services for this view are not available."
msgstr ""
#: exceptions.py:198
#: exceptions.py:209
msgid "Unauthorized. Please try logging in again."
msgstr ""
@ -182,7 +186,7 @@ msgid "Unable to disassociate floating IP."
msgstr ""
#: dashboards/nova/access_and_security/floating_ips/tables.py:91
#: dashboards/nova/instances_and_volumes/instances/tables.py:224
#: dashboards/nova/instances_and_volumes/instances/tables.py:228
#: dashboards/syspanel/instances/tables.py:52
msgid "IP Address"
msgstr ""
@ -548,7 +552,7 @@ msgstr ""
#: dashboards/nova/containers/tables.py:107
#: dashboards/nova/containers/tables.py:171
#: dashboards/nova/instances_and_volumes/instances/tables.py:225
#: dashboards/nova/instances_and_volumes/instances/tables.py:229
#: dashboards/nova/instances_and_volumes/volumes/tables.py:113
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:30
#: dashboards/nova/templates/nova/instances_and_volumes/volumes/_detail_overview.html:29
@ -743,7 +747,7 @@ msgid "Image Name"
msgstr ""
#: dashboards/nova/images_and_snapshots/images/tables.py:89
#: dashboards/nova/instances_and_volumes/instances/tables.py:228
#: dashboards/nova/instances_and_volumes/instances/tables.py:232
#: dashboards/nova/instances_and_volumes/volumes/tables.py:116
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:15
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:18
@ -897,7 +901,7 @@ msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:69
#: dashboards/nova/instances_and_volumes/instances/tables.py:84
#: dashboards/nova/instances_and_volumes/instances/tables.py:112
#: dashboards/nova/instances_and_volumes/instances/tables.py:242
#: dashboards/nova/instances_and_volumes/instances/tables.py:246
#: dashboards/syspanel/instances/panel.py:28
#: dashboards/syspanel/instances/tables.py:70
#: dashboards/syspanel/projects/forms.py:115
@ -972,17 +976,17 @@ msgstr ""
msgid "Not available"
msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:223
#: dashboards/nova/instances_and_volumes/instances/tables.py:227
#: dashboards/syspanel/instances/tables.py:51 usage/tables.py:46
msgid "Instance Name"
msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:232
#: dashboards/nova/instances_and_volumes/instances/tables.py:236
#: dashboards/syspanel/instances/tables.py:60
msgid "Task"
msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:238
#: dashboards/nova/instances_and_volumes/instances/tables.py:242
#: dashboards/syspanel/instances/tables.py:66
msgid "Power State"
msgstr ""
@ -2166,7 +2170,7 @@ msgstr ""
msgid "Login"
msgstr ""
#: templates/horizon/common/_data_table.html:29
#: templates/horizon/common/_data_table.html:31
#, python-format
msgid "Displaying %(counter)s item"
msgid_plural "Displaying %(counter)s items"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: openstack-dashboard\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-25 13:51-0700\n"
"POT-Creation-Date: 2012-03-26 17:59-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Takeshi Nakajima <tnakaji@midokura.jp>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -22,16 +22,21 @@ msgstr ""
msgid "Other"
msgstr ""
#: decorators.py:58 decorators.py:92
#: decorators.py:56
#, fuzzy
msgid "Please log in to continue."
msgstr "キー%sを削除できません。"
#: decorators.py:89
#, python-format
msgid "You are not authorized to access %s"
msgstr ""
#: decorators.py:133
#: decorators.py:130
msgid "The services for this view are not available."
msgstr ""
#: exceptions.py:198
#: exceptions.py:209
msgid "Unauthorized. Please try logging in again."
msgstr ""
@ -193,7 +198,7 @@ msgid "Unable to disassociate floating IP."
msgstr "イメージ%sを更新できません。"
#: dashboards/nova/access_and_security/floating_ips/tables.py:91
#: dashboards/nova/instances_and_volumes/instances/tables.py:224
#: dashboards/nova/instances_and_volumes/instances/tables.py:228
#: dashboards/syspanel/instances/tables.py:52
msgid "IP Address"
msgstr ""
@ -581,7 +586,7 @@ msgstr "ユーザ名"
#: dashboards/nova/containers/tables.py:107
#: dashboards/nova/containers/tables.py:171
#: dashboards/nova/instances_and_volumes/instances/tables.py:225
#: dashboards/nova/instances_and_volumes/instances/tables.py:229
#: dashboards/nova/instances_and_volumes/volumes/tables.py:113
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:30
#: dashboards/nova/templates/nova/instances_and_volumes/volumes/_detail_overview.html:29
@ -797,7 +802,7 @@ msgid "Image Name"
msgstr "ユーザ名"
#: dashboards/nova/images_and_snapshots/images/tables.py:89
#: dashboards/nova/instances_and_volumes/instances/tables.py:228
#: dashboards/nova/instances_and_volumes/instances/tables.py:232
#: dashboards/nova/instances_and_volumes/volumes/tables.py:116
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:15
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:18
@ -971,7 +976,7 @@ msgstr "削除"
#: dashboards/nova/instances_and_volumes/instances/tables.py:69
#: dashboards/nova/instances_and_volumes/instances/tables.py:84
#: dashboards/nova/instances_and_volumes/instances/tables.py:112
#: dashboards/nova/instances_and_volumes/instances/tables.py:242
#: dashboards/nova/instances_and_volumes/instances/tables.py:246
#: dashboards/syspanel/instances/panel.py:28
#: dashboards/syspanel/instances/tables.py:70
#: dashboards/syspanel/projects/forms.py:115
@ -1048,18 +1053,18 @@ msgstr ""
msgid "Not available"
msgstr "現在イメージがありません。"
#: dashboards/nova/instances_and_volumes/instances/tables.py:223
#: dashboards/nova/instances_and_volumes/instances/tables.py:227
#: dashboards/syspanel/instances/tables.py:51 usage/tables.py:46
#, fuzzy
msgid "Instance Name"
msgstr "インスタンス"
#: dashboards/nova/instances_and_volumes/instances/tables.py:232
#: dashboards/nova/instances_and_volumes/instances/tables.py:236
#: dashboards/syspanel/instances/tables.py:60
msgid "Task"
msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:238
#: dashboards/nova/instances_and_volumes/instances/tables.py:242
#: dashboards/syspanel/instances/tables.py:66
#, fuzzy
msgid "Power State"
@ -2333,7 +2338,7 @@ msgstr ""
msgid "Login"
msgstr ""
#: templates/horizon/common/_data_table.html:29
#: templates/horizon/common/_data_table.html:31
#, python-format
msgid "Displaying %(counter)s item"
msgid_plural "Displaying %(counter)s items"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: openstack-dashboard\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-25 13:51-0700\n"
"POT-Creation-Date: 2012-03-26 17:59-0700\n"
"PO-Revision-Date: 2011-09-24 14:41+0100\n"
"Last-Translator: Tomasz 'Zen' Napierala <tomasz@napierala.org>\n"
"Language-Team: Polish OpenStack translations team <tomasz+openstack-"
@ -24,16 +24,21 @@ msgstr ""
msgid "Other"
msgstr ""
#: decorators.py:58 decorators.py:92
#: decorators.py:56
#, fuzzy
msgid "Please log in to continue."
msgstr "Nie można usunąć klucza: %s"
#: decorators.py:89
#, python-format
msgid "You are not authorized to access %s"
msgstr ""
#: decorators.py:133
#: decorators.py:130
msgid "The services for this view are not available."
msgstr ""
#: exceptions.py:198
#: exceptions.py:209
msgid "Unauthorized. Please try logging in again."
msgstr ""
@ -193,7 +198,7 @@ msgid "Unable to disassociate floating IP."
msgstr "Nie można zaktualizować obrazu: %s"
#: dashboards/nova/access_and_security/floating_ips/tables.py:91
#: dashboards/nova/instances_and_volumes/instances/tables.py:224
#: dashboards/nova/instances_and_volumes/instances/tables.py:228
#: dashboards/syspanel/instances/tables.py:52
msgid "IP Address"
msgstr ""
@ -576,7 +581,7 @@ msgstr ""
#: dashboards/nova/containers/tables.py:107
#: dashboards/nova/containers/tables.py:171
#: dashboards/nova/instances_and_volumes/instances/tables.py:225
#: dashboards/nova/instances_and_volumes/instances/tables.py:229
#: dashboards/nova/instances_and_volumes/volumes/tables.py:113
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:30
#: dashboards/nova/templates/nova/instances_and_volumes/volumes/_detail_overview.html:29
@ -789,7 +794,7 @@ msgid "Image Name"
msgstr "Obrazy"
#: dashboards/nova/images_and_snapshots/images/tables.py:89
#: dashboards/nova/instances_and_volumes/instances/tables.py:228
#: dashboards/nova/instances_and_volumes/instances/tables.py:232
#: dashboards/nova/instances_and_volumes/volumes/tables.py:116
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:15
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:18
@ -961,7 +966,7 @@ msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:69
#: dashboards/nova/instances_and_volumes/instances/tables.py:84
#: dashboards/nova/instances_and_volumes/instances/tables.py:112
#: dashboards/nova/instances_and_volumes/instances/tables.py:242
#: dashboards/nova/instances_and_volumes/instances/tables.py:246
#: dashboards/syspanel/instances/panel.py:28
#: dashboards/syspanel/instances/tables.py:70
#: dashboards/syspanel/projects/forms.py:115
@ -1038,18 +1043,18 @@ msgstr ""
msgid "Not available"
msgstr "brak dostępnych"
#: dashboards/nova/instances_and_volumes/instances/tables.py:223
#: dashboards/nova/instances_and_volumes/instances/tables.py:227
#: dashboards/syspanel/instances/tables.py:51 usage/tables.py:46
#, fuzzy
msgid "Instance Name"
msgstr "Instancje"
#: dashboards/nova/instances_and_volumes/instances/tables.py:232
#: dashboards/nova/instances_and_volumes/instances/tables.py:236
#: dashboards/syspanel/instances/tables.py:60
msgid "Task"
msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:238
#: dashboards/nova/instances_and_volumes/instances/tables.py:242
#: dashboards/syspanel/instances/tables.py:66
msgid "Power State"
msgstr ""
@ -2310,7 +2315,7 @@ msgstr ""
msgid "Login"
msgstr ""
#: templates/horizon/common/_data_table.html:29
#: templates/horizon/common/_data_table.html:31
#, python-format
msgid "Displaying %(counter)s item"
msgid_plural "Displaying %(counter)s items"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: openstack-dashboard\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-25 13:51-0700\n"
"POT-Creation-Date: 2012-03-26 17:59-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -21,16 +21,20 @@ msgstr ""
msgid "Other"
msgstr ""
#: decorators.py:58 decorators.py:92
#: decorators.py:56
msgid "Please log in to continue."
msgstr ""
#: decorators.py:89
#, python-format
msgid "You are not authorized to access %s"
msgstr ""
#: decorators.py:133
#: decorators.py:130
msgid "The services for this view are not available."
msgstr ""
#: exceptions.py:198
#: exceptions.py:209
msgid "Unauthorized. Please try logging in again."
msgstr ""
@ -181,7 +185,7 @@ msgid "Unable to disassociate floating IP."
msgstr ""
#: dashboards/nova/access_and_security/floating_ips/tables.py:91
#: dashboards/nova/instances_and_volumes/instances/tables.py:224
#: dashboards/nova/instances_and_volumes/instances/tables.py:228
#: dashboards/syspanel/instances/tables.py:52
msgid "IP Address"
msgstr ""
@ -547,7 +551,7 @@ msgstr ""
#: dashboards/nova/containers/tables.py:107
#: dashboards/nova/containers/tables.py:171
#: dashboards/nova/instances_and_volumes/instances/tables.py:225
#: dashboards/nova/instances_and_volumes/instances/tables.py:229
#: dashboards/nova/instances_and_volumes/volumes/tables.py:113
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:30
#: dashboards/nova/templates/nova/instances_and_volumes/volumes/_detail_overview.html:29
@ -742,7 +746,7 @@ msgid "Image Name"
msgstr ""
#: dashboards/nova/images_and_snapshots/images/tables.py:89
#: dashboards/nova/instances_and_volumes/instances/tables.py:228
#: dashboards/nova/instances_and_volumes/instances/tables.py:232
#: dashboards/nova/instances_and_volumes/volumes/tables.py:116
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:15
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:18
@ -896,7 +900,7 @@ msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:69
#: dashboards/nova/instances_and_volumes/instances/tables.py:84
#: dashboards/nova/instances_and_volumes/instances/tables.py:112
#: dashboards/nova/instances_and_volumes/instances/tables.py:242
#: dashboards/nova/instances_and_volumes/instances/tables.py:246
#: dashboards/syspanel/instances/panel.py:28
#: dashboards/syspanel/instances/tables.py:70
#: dashboards/syspanel/projects/forms.py:115
@ -971,17 +975,17 @@ msgstr ""
msgid "Not available"
msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:223
#: dashboards/nova/instances_and_volumes/instances/tables.py:227
#: dashboards/syspanel/instances/tables.py:51 usage/tables.py:46
msgid "Instance Name"
msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:232
#: dashboards/nova/instances_and_volumes/instances/tables.py:236
#: dashboards/syspanel/instances/tables.py:60
msgid "Task"
msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:238
#: dashboards/nova/instances_and_volumes/instances/tables.py:242
#: dashboards/syspanel/instances/tables.py:66
msgid "Power State"
msgstr ""
@ -2165,7 +2169,7 @@ msgstr ""
msgid "Login"
msgstr ""
#: templates/horizon/common/_data_table.html:29
#: templates/horizon/common/_data_table.html:31
#, python-format
msgid "Displaying %(counter)s item"
msgid_plural "Displaying %(counter)s items"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-25 13:51-0700\n"
"POT-Creation-Date: 2012-03-26 17:59-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -21,16 +21,20 @@ msgstr ""
msgid "Other"
msgstr ""
#: decorators.py:58 decorators.py:92
#: decorators.py:56
msgid "Please log in to continue."
msgstr ""
#: decorators.py:89
#, python-format
msgid "You are not authorized to access %s"
msgstr ""
#: decorators.py:133
#: decorators.py:130
msgid "The services for this view are not available."
msgstr ""
#: exceptions.py:198
#: exceptions.py:209
msgid "Unauthorized. Please try logging in again."
msgstr ""
@ -181,7 +185,7 @@ msgid "Unable to disassociate floating IP."
msgstr ""
#: dashboards/nova/access_and_security/floating_ips/tables.py:91
#: dashboards/nova/instances_and_volumes/instances/tables.py:224
#: dashboards/nova/instances_and_volumes/instances/tables.py:228
#: dashboards/syspanel/instances/tables.py:52
msgid "IP Address"
msgstr ""
@ -547,7 +551,7 @@ msgstr ""
#: dashboards/nova/containers/tables.py:107
#: dashboards/nova/containers/tables.py:171
#: dashboards/nova/instances_and_volumes/instances/tables.py:225
#: dashboards/nova/instances_and_volumes/instances/tables.py:229
#: dashboards/nova/instances_and_volumes/volumes/tables.py:113
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:30
#: dashboards/nova/templates/nova/instances_and_volumes/volumes/_detail_overview.html:29
@ -742,7 +746,7 @@ msgid "Image Name"
msgstr ""
#: dashboards/nova/images_and_snapshots/images/tables.py:89
#: dashboards/nova/instances_and_volumes/instances/tables.py:228
#: dashboards/nova/instances_and_volumes/instances/tables.py:232
#: dashboards/nova/instances_and_volumes/volumes/tables.py:116
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:15
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:18
@ -896,7 +900,7 @@ msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:69
#: dashboards/nova/instances_and_volumes/instances/tables.py:84
#: dashboards/nova/instances_and_volumes/instances/tables.py:112
#: dashboards/nova/instances_and_volumes/instances/tables.py:242
#: dashboards/nova/instances_and_volumes/instances/tables.py:246
#: dashboards/syspanel/instances/panel.py:28
#: dashboards/syspanel/instances/tables.py:70
#: dashboards/syspanel/projects/forms.py:115
@ -971,17 +975,17 @@ msgstr ""
msgid "Not available"
msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:223
#: dashboards/nova/instances_and_volumes/instances/tables.py:227
#: dashboards/syspanel/instances/tables.py:51 usage/tables.py:46
msgid "Instance Name"
msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:232
#: dashboards/nova/instances_and_volumes/instances/tables.py:236
#: dashboards/syspanel/instances/tables.py:60
msgid "Task"
msgstr ""
#: dashboards/nova/instances_and_volumes/instances/tables.py:238
#: dashboards/nova/instances_and_volumes/instances/tables.py:242
#: dashboards/syspanel/instances/tables.py:66
msgid "Power State"
msgstr ""
@ -2165,7 +2169,7 @@ msgstr ""
msgid "Login"
msgstr ""
#: templates/horizon/common/_data_table.html:29
#: templates/horizon/common/_data_table.html:31
#, python-format
msgid "Displaying %(counter)s item"
msgid_plural "Displaying %(counter)s items"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-25 13:51-0700\n"
"POT-Creation-Date: 2012-03-26 17:59-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Andy Chong <andycjw@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -21,16 +21,21 @@ msgstr ""
msgid "Other"
msgstr "其它"
#: decorators.py:58 decorators.py:92
#: decorators.py:56
#, fuzzy
msgid "Please log in to continue."
msgstr "無法列出容器。"
#: decorators.py:89
#, python-format
msgid "You are not authorized to access %s"
msgstr "您的權限不足 無法查看%s"
#: decorators.py:133
#: decorators.py:130
msgid "The services for this view are not available."
msgstr "這頁面的服務並不存在"
#: exceptions.py:198
#: exceptions.py:209
msgid "Unauthorized. Please try logging in again."
msgstr "權限不足。 請重新登入。"
@ -181,7 +186,7 @@ msgid "Unable to disassociate floating IP."
msgstr "無法釋放浮動IP。"
#: dashboards/nova/access_and_security/floating_ips/tables.py:91
#: dashboards/nova/instances_and_volumes/instances/tables.py:224
#: dashboards/nova/instances_and_volumes/instances/tables.py:228
#: dashboards/syspanel/instances/tables.py:52
msgid "IP Address"
msgstr "IP位址"
@ -551,7 +556,7 @@ msgstr "物件"
#: dashboards/nova/containers/tables.py:107
#: dashboards/nova/containers/tables.py:171
#: dashboards/nova/instances_and_volumes/instances/tables.py:225
#: dashboards/nova/instances_and_volumes/instances/tables.py:229
#: dashboards/nova/instances_and_volumes/volumes/tables.py:113
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:30
#: dashboards/nova/templates/nova/instances_and_volumes/volumes/_detail_overview.html:29
@ -746,7 +751,7 @@ msgid "Image Name"
msgstr "映像名稱"
#: dashboards/nova/images_and_snapshots/images/tables.py:89
#: dashboards/nova/instances_and_volumes/instances/tables.py:228
#: dashboards/nova/instances_and_volumes/instances/tables.py:232
#: dashboards/nova/instances_and_volumes/volumes/tables.py:116
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:15
#: dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html:18
@ -900,7 +905,7 @@ msgstr "已終止執行"
#: dashboards/nova/instances_and_volumes/instances/tables.py:69
#: dashboards/nova/instances_and_volumes/instances/tables.py:84
#: dashboards/nova/instances_and_volumes/instances/tables.py:112
#: dashboards/nova/instances_and_volumes/instances/tables.py:242
#: dashboards/nova/instances_and_volumes/instances/tables.py:246
#: dashboards/syspanel/instances/panel.py:28
#: dashboards/syspanel/instances/tables.py:70
#: dashboards/syspanel/projects/forms.py:115
@ -975,17 +980,17 @@ msgstr "%(RAM)s 記憶體 | %(VCPU)s 虛擬處理器 | %(disk)s 磁碟"
msgid "Not available"
msgstr "不存在"
#: dashboards/nova/instances_and_volumes/instances/tables.py:223
#: dashboards/nova/instances_and_volumes/instances/tables.py:227
#: dashboards/syspanel/instances/tables.py:51 usage/tables.py:46
msgid "Instance Name"
msgstr "執行個體名稱"
#: dashboards/nova/instances_and_volumes/instances/tables.py:232
#: dashboards/nova/instances_and_volumes/instances/tables.py:236
#: dashboards/syspanel/instances/tables.py:60
msgid "Task"
msgstr "工作"
#: dashboards/nova/instances_and_volumes/instances/tables.py:238
#: dashboards/nova/instances_and_volumes/instances/tables.py:242
#: dashboards/syspanel/instances/tables.py:66
msgid "Power State"
msgstr "電源狀態"
@ -2183,7 +2188,7 @@ msgstr ""
msgid "Login"
msgstr "登入"
#: templates/horizon/common/_data_table.html:29
#: templates/horizon/common/_data_table.html:31
#, python-format
msgid "Displaying %(counter)s item"
msgid_plural "Displaying %(counter)s items"

View File

@ -57,7 +57,8 @@ class HorizonMiddleware(object):
Catches internal Horizon exception classes such as NotAuthorized,
NotFound and Http302 and handles them gracefully.
"""
if isinstance(exception, exceptions.NotAuthorized):
if isinstance(exception,
(exceptions.NotAuthorized, exceptions.NotAuthenticated)):
auth_url = reverse("horizon:auth_login")
next_url = iri_to_uri(request.get_full_path())
if next_url != auth_url:

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-25 13:51-0700\n"
"POT-Creation-Date: 2012-03-26 17:59-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -54,6 +54,10 @@ msgstr ""
msgid "Traditional Chinese"
msgstr ""
#: local/local_settings.py:17
msgid "Your password must be at least 6 characters long."
msgstr ""
#: templates/403.html:4 templates/403.html.py:9
msgid "Forbidden"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-25 13:51-0700\n"
"POT-Creation-Date: 2012-03-26 17:59-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -54,6 +54,10 @@ msgstr ""
msgid "Traditional Chinese"
msgstr ""
#: local/local_settings.py:17
msgid "Your password must be at least 6 characters long."
msgstr ""
#: templates/403.html:4 templates/403.html.py:9
msgid "Forbidden"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-25 13:51-0700\n"
"POT-Creation-Date: 2012-03-26 17:59-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -54,6 +54,10 @@ msgstr ""
msgid "Traditional Chinese"
msgstr ""
#: local/local_settings.py:17
msgid "Your password must be at least 6 characters long."
msgstr ""
#: templates/403.html:4 templates/403.html.py:9
msgid "Forbidden"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-25 13:51-0700\n"
"POT-Creation-Date: 2012-03-26 17:59-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -55,6 +55,10 @@ msgstr ""
msgid "Traditional Chinese"
msgstr ""
#: local/local_settings.py:17
msgid "Your password must be at least 6 characters long."
msgstr ""
#: templates/403.html:4 templates/403.html.py:9
msgid "Forbidden"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-25 13:51-0700\n"
"POT-Creation-Date: 2012-03-26 17:59-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -54,6 +54,10 @@ msgstr ""
msgid "Traditional Chinese"
msgstr ""
#: local/local_settings.py:17
msgid "Your password must be at least 6 characters long."
msgstr ""
#: templates/403.html:4 templates/403.html.py:9
msgid "Forbidden"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-25 13:51-0700\n"
"POT-Creation-Date: 2012-03-26 17:59-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -53,6 +53,10 @@ msgstr ""
msgid "Traditional Chinese"
msgstr ""
#: local/local_settings.py:17
msgid "Your password must be at least 6 characters long."
msgstr ""
#: templates/403.html:4 templates/403.html.py:9
msgid "Forbidden"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-25 13:51-0700\n"
"POT-Creation-Date: 2012-03-26 17:59-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -53,6 +53,10 @@ msgstr ""
msgid "Traditional Chinese"
msgstr ""
#: local/local_settings.py:17
msgid "Your password must be at least 6 characters long."
msgstr ""
#: templates/403.html:4 templates/403.html.py:9
msgid "Forbidden"
msgstr "禁止"