def can_add_group(user):
    result = user.has_perm('django_intranet_stuff.can_add_wiki_group')
    return result


def can_edit_group(group, user):
    result = (
        user.has_perm('django_intranet_stuff.can_edit_wiki_group')
        or group.is_responsible(user)
    )

    return result


def can_delete_group(user):
    result = user.has_perm('django_intranet_stuff.can_delete_wiki_group')
    return result
