示例#1
0
def user_listing_buttons(context, user):
    yield UserListingButton(_('Edit'),
                            reverse('wagtailusers_users:edit', args=[user.pk]),
                            attrs={'title': _('Edit this user')},
                            priority=10)
    if user_can_delete_user(context.request.user, user):
        yield UserListingButton(_('Delete'),
                                reverse('wagtailusers_users:delete',
                                        args=[user.pk]),
                                classes={'no'},
                                attrs={'title': _('Delete this user')},
                                priority=20)
示例#2
0
def user_listing_buttons(context, user):
    yield UserListingButton(
        _("Edit"),
        reverse("wagtailusers_users:edit", args=[user.pk]),
        attrs={"title": _("Edit this user")},
        priority=10,
    )
    if user_can_delete_user(context.request.user, user):
        yield UserListingButton(
            _("Delete"),
            reverse("wagtailusers_users:delete", args=[user.pk]),
            classes={"no"},
            attrs={"title": _("Delete this user")},
            priority=20,
        )
示例#3
0
def user_listing_buttons(context, user):
    yield UserListingButton(
        _("View Permissions"),
        reverse("permissions:user", args=[user.pk]),
        attrs={"title": _("View permissions for this user")},
        priority=15,
    )
示例#4
0
def register_user_listing_buttons(context, user):
    yield UserListingButton(
        _("Manage 2FA"),
        reverse("wagtail_2fa_device_list", kwargs={"user_id": user.id}),
        attrs={"title": _("Edit this user")},
        priority=100,
    )
示例#5
0
def register_user_listing_buttons(context, user):
    yield UserListingButton(_('Manage 2FA'),
                            reverse('wagtail_2fa_device_list',
                                    kwargs={'user_id': user.id}),
                            attrs={'title': _('Edit this user')},
                            priority=100)
示例#6
0
def user_listing_buttons(context, user):
    yield UserListingButton(
        _('View Permissions'),
        reverse('permissions:user', args=[user.pk]),
        attrs={'title': _('View permissions for this user')},
        priority=15)