Skip to content

Commit

Permalink
Merge pull request #50 from yduman/user-story-51
Browse files Browse the repository at this point in the history
Independent access for admin
  • Loading branch information
ckleemann committed Mar 20, 2017
2 parents 924f9a2 + 1f73992 commit b4ef3a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/feedback/tests/test_views_intern.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,3 +492,4 @@ def test_post(self):
# aber wirklich (siehe https://docs.djangoproject.com/en/1.4/topics/testing/#email-services)
self.assertEqual(len(mail.outbox), 2)
self.assertEqual(len(mail.outbox[0].to), 3) # an zwei veranstalter und sekretaerin

8 changes: 2 additions & 6 deletions src/feedback/views/intern/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ def rechte_uebernehmen(request):
request.session['vid'] = v
request.session['veranstaltung'] = unicode(veranst)

if veranst.status == Veranstaltung.STATUS_BESTELLUNG_LIEGT_VOR or \
veranst.status == Veranstaltung.STATUS_BESTELLUNG_GEOEFFNET:
return HttpResponseRedirect(reverse('veranstalter-index'))
else:
messages.warning(request, u'Fehler beim übernehmen der Rechte. '
u'Der Status der Veranstaltung ist nicht berechtigt.')
return HttpResponseRedirect(reverse('veranstalter-index'))

except KeyError:
pass

Expand Down

0 comments on commit b4ef3a3

Please sign in to comment.