diff options
author | maxbr <maxbr@mi.fu-berlin.de> | 2016-08-19 17:15:28 +0200 |
---|---|---|
committer | maxbr <maxbr@mi.fu-berlin.de> | 2016-08-19 17:15:28 +0200 |
commit | ebaa05ab2b53634a7a3e738618a031fd1518d796 (patch) | |
tree | 2df4bf769f6ed52f4b9109a96d3194aa5a95e453 /tools/pharos-dashboard/account/forms.py | |
parent | 54322038f766be460b676d60974886be5f04d8f3 (diff) |
Use Jira Oauth for user authentication
JIRA: RELENG-12
Users can use their jira accounts for the dashboard. This also allows
the dasboard to open jira tickets for bookings.
Signed-off-by: maxbr <maxbr@mi.fu-berlin.de>
Diffstat (limited to 'tools/pharos-dashboard/account/forms.py')
-rw-r--r-- | tools/pharos-dashboard/account/forms.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/tools/pharos-dashboard/account/forms.py b/tools/pharos-dashboard/account/forms.py index 7893867f..14f11cda 100644 --- a/tools/pharos-dashboard/account/forms.py +++ b/tools/pharos-dashboard/account/forms.py @@ -1,17 +1,14 @@ import django.forms as forms import pytz as pytz -from registration.forms import RegistrationForm as BaseRegistrationForm +from account.models import UserProfile -class AccountSettingsForm(forms.Form): - fields = ['first_name', 'last_name', 'email', 'company', 'ssh_public_key', 'pgp_public_key', - 'timezone'] +class AccountSettingsForm(forms.ModelForm): + class Meta: + model = UserProfile + fields = ['company', 'ssh_public_key', 'pgp_public_key', 'timezone'] - first_name = forms.CharField(max_length=30) - last_name = forms.CharField(max_length=30) - email = forms.EmailField() - company = forms.CharField(max_length=30) ssh_public_key = forms.CharField(max_length=2048, widget=forms.Textarea) pgp_public_key = forms.CharField(max_length=2048, widget=forms.Textarea) - timezone = forms.ChoiceField(choices=[(x, x) for x in pytz.common_timezones], initial='UTC')
\ No newline at end of file + timezone = forms.ChoiceField(choices=[(x, x) for x in pytz.common_timezones], initial='UTC') |