Skip to content

Commit

Permalink
Merge pull request #4041 from 66eli77/supermodal-firsttime-issue
Browse files Browse the repository at this point in the history
fix superuser modal 403, which is caused by CSRF related problem
  • Loading branch information
aronasorman committed Jul 7, 2015
2 parents 7bdfd94 + 613eec9 commit d16da9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kalite/distributed/static/js/distributed/user/views.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ window.SuperUserCreateModalView = BaseView.extend({
this.show_modal();
$.ajax({
context: this,
type: 'post',
type: 'GET',
url: 'api/django_user_form',
dataType: 'json',
success : function(e){
Expand Down
3 changes: 1 addition & 2 deletions kalite/distributed/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
from kalite.distributed.forms import SuperuserForm
import json


def check_setup_status(handler):
"""
Decorator for validating that KA Lite post-install setup has completed.
Expand Down Expand Up @@ -229,7 +228,7 @@ def search(request):
}

def add_superuser_form(request):
if request.method == 'POST':
if request.method == 'GET':
form = SuperuserForm()
return_html = render_to_string('admin/superuser_form.html', {'form': form}, context_instance=RequestContext(request))
data = {'Status' : 'ShowModal', 'data' : return_html}
Expand Down

0 comments on commit d16da9f

Please sign in to comment.