diff -r 1edd01373e71 -r 1fdaab4a6ef2 app/soc/views/site/user/profile.py --- a/app/soc/views/site/user/profile.py Thu Oct 09 23:38:27 2008 +0000 +++ b/app/soc/views/site/user/profile.py Thu Oct 09 23:48:20 2008 +0000 @@ -30,6 +30,7 @@ from soc.logic import validate from soc.logic import out_of_band +from soc.logic.helper import access from soc.logic.site import id_user from soc.views import simple from soc.views import helper @@ -103,14 +104,15 @@ A subclass of django.http.HttpResponse which either contains the form to be filled out, or a redirect to the correct view in the interface. """ + + try: + access.checkIsDeveloper(request) + except soc.logic.out_of_band.AccessViolationResponse, alt_response: + return alt_response.response() + # create default template context for use with any templates context = helper.responses.getUniversalContext(request) - alt_response = simple.getAltResponseIfNotDeveloper(request, - context=context) - if alt_response: - return alt_response - user = None # assume that no User entity will be found form = None # assume blank form needs to be displayed lookup_message = ugettext_lazy('Enter information to look up a User.') @@ -249,14 +251,15 @@ A subclass of django.http.HttpResponse which either contains the form to be filled out, or a redirect to the correct view in the interface. """ + + try: + access.checkIsDeveloper(request) + except soc.logic.out_of_band.AccessViolationResponse, alt_response: + return alt_response.response() + # create default template context for use with any templates context = helper.responses.getUniversalContext(request) - alt_response = simple.getAltResponseIfNotDeveloper(request, - context=context) - if alt_response: - return alt_response - user = None # assume that no User entity will be found # try to fetch User entity corresponding to linkname if one exists @@ -391,14 +394,15 @@ A subclass of django.http.HttpResponse which either contains the form to be filled out, or a redirect to the correct view in the interface. """ + + try: + access.checkIsDeveloper(request) + except soc.logic.out_of_band.AccessViolationResponse, alt_response: + return alt_response.response() + # create default template context for use with any templates context = helper.responses.getUniversalContext(request) - alt_response = simple.getAltResponseIfNotDeveloper(request, - context=context) - if alt_response: - return alt_response - if request.method == 'POST': form = CreateForm(request.POST)