Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenStack Horizon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cloud
GUI
OpenStack Horizon
Commits
2f7e630b
Commit
2f7e630b
authored
6 years ago
by
Zuul
Committed by
Gerrit Code Review
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Correct error messages on create rbac policy form"
parents
27d7b697
31395b4d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openstack_dashboard/dashboards/admin/rbac_policies/forms.py
+5
-0
5 additions, 0 deletions
openstack_dashboard/dashboards/admin/rbac_policies/forms.py
with
5 additions
and
0 deletions
openstack_dashboard/dashboards/admin/rbac_policies/forms.py
+
5
−
0
View file @
2f7e630b
...
...
@@ -15,6 +15,7 @@ import logging
from
django.urls
import
reverse
from
django.utils.translation
import
ugettext_lazy
as
_
from
neutronclient.common
import
exceptions
as
neutron_exc
from
horizon
import
exceptions
from
horizon
import
forms
...
...
@@ -130,6 +131,10 @@ class CreatePolicyForm(forms.SelfHandlingForm):
msg
=
_
(
'
RBAC Policy was successfully created.
'
)
messages
.
success
(
request
,
msg
)
return
rbac_policy
except
neutron_exc
.
OverQuotaClient
:
redirect
=
reverse
(
'
horizon:admin:rbac_policies:index
'
)
msg
=
_
(
'
rbac policy quota exceeded.
'
)
exceptions
.
handle
(
request
,
msg
,
redirect
=
redirect
)
except
Exception
:
redirect
=
reverse
(
'
horizon:admin:rbac_policies:index
'
)
msg
=
_
(
'
Failed to create a rbac policy.
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment