Exemplo n.º 1
0
def new_access_group(request, team):
    initial = {
        'type': MEMBER_USER,
    }

    form = NewAccessGroupForm(request.POST or None, initial=initial)
    if form.is_valid():
        inst = form.save(commit=False)
        inst.team = team
        inst.managed = False
        inst.save()
        return HttpResponseRedirect(reverse('sentry-manage-access-groups', args=[team.slug]))

    context = csrf(request)
    context.update({
        'form': form,
        'SUBSECTION': 'groups',
    })

    return render_with_team_context(team, 'sentry/teams/groups/new.html', context, request)
Exemplo n.º 2
0
def new_access_group(request, team):
    initial = {
        'type': MEMBER_USER,
    }

    form = NewAccessGroupForm(request.POST or None, initial=initial)
    if form.is_valid():
        inst = form.save(commit=False)
        inst.team = team
        inst.managed = False
        inst.save()
        return HttpResponseRedirect(reverse('sentry-manage-access-groups', args=[team.slug]))

    context = csrf(request)
    context.update({
        'form': form,
        'SUBSECTION': 'groups',
    })

    return render_with_team_context(team, 'sentry/teams/groups/new.html', context, request)