~ubuntu-branches/ubuntu/raring/horizon/raring

« back to all changes in this revision

Viewing changes to horizon/dashboards/syspanel/users/forms.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-06-01 10:57:56 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20120601105756-dif0km7n98vhdi2x
Tags: 2012.2~f2~20120530.1777-0ubuntu1
* New upstream release. 
* debian/patches/add_juju_settings_panel.patch: Refreshed
* debian/patches/turn-off-debug.patch: Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from django import shortcuts
24
24
from django.contrib import messages
 
25
from django.forms import ValidationError
25
26
from django.utils.translation import force_unicode, ugettext_lazy as _
26
 
from django.forms import ValidationError
 
27
from django.views.decorators.debug import sensitive_variables
27
28
 
28
29
from horizon import api
29
30
from horizon import exceptions
72
73
            widget=forms.PasswordInput(render_value=False))
73
74
    tenant_id = forms.ChoiceField(label=_("Primary Project"))
74
75
 
 
76
    # We have to protect the entire "data" dict because it contains the
 
77
    # password and confirm_password strings.
 
78
    @sensitive_variables('data')
75
79
    def handle(self, request, data):
76
80
        try:
77
81
            LOG.info('Creating user with name "%s"' % data['name'])
123
127
            for field in ('name', 'email', 'password', 'confirm_password'):
124
128
                self.fields.pop(field)
125
129
 
 
130
    # We have to protect the entire "data" dict because it contains the
 
131
    # password and confirm_password strings.
 
132
    @sensitive_variables('data', 'password')
126
133
    def handle(self, request, data):
127
134
        failed, succeeded = [], []
128
135
        user_is_editable = api.keystone_can_edit_user()