def edit_project_member(request, project, member_id): try: member = project.member_set.get(pk=member_id) except ProjectMember.DoesNotExist: return HttpResponseRedirect(reverse('sentry-manage-project', args=[project.pk])) result = plugins.first('has_perm', request.user, 'edit_project_member', member) if result is False and not request.user.has_perm('sentry.can_change_projectmember'): return HttpResponseRedirect(reverse('sentry')) form = EditProjectMemberForm(project, request.POST or None, instance=member) if form.is_valid(): member = form.save(commit=True) return HttpResponseRedirect(request.path + '?success=1') context = csrf(request) context.update({ 'member': member, 'project': project, 'form': form, 'dsn': member.get_dsn(), }) return render_to_response('sentry/projects/members/edit.html', context, request)
def edit_project_member(request, project, member_id): member = project.member_set.get(pk=member_id) form = EditProjectMemberForm(project, request.POST or None, instance=member) if form.is_valid(): member = form.save(commit=True) return HttpResponseRedirect(request.path + '?success=1') context = csrf(request) context.update({ 'member': member, 'project': project, 'form': form, }) return render_to_response('sentry/projects/members/edit.html', context, request)