(request, app, category="", operate="", obj=None)
return bool(needs.intersection(perms))
检查用户是否具有某一微信权限
    :type request: django.http.request.HttpRequest
检查用户是否具有某一微信权限
    :type request: django.http.request.HttpRequest
检查用户是否具有某一微信权限 : type request : django . http . request . HttpRequest
def has_wechat_permission(request, app, category="", operate="", obj=None):
    """
    检查用户是否具有某一微信权限
    :type request: django.http.request.HttpRequest
    """
    if request.user.is_superuser:
        return True
    perms = get_user_permissions(request.user, app)
    needs = {category, "{0}_{1}".format(category, operate)}
    return bool(needs.intersection(perms))
def has_wechat_permission ( request , app , category = "" , operate = "" , obj = None ) : if request . user . is_superuser : return True perms = get_user_permissions ( request . user , app ) needs = { category , "{0}_{1}" . format ( category , operate ) } return bool ( needs . intersection ( perms ) )