Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def jsonify_user(obj):
result = jsonify_sqlobject( obj )
del result['password']
result["groups"] = [g.group_name for g in obj.groups]
result["permissions"] = [p.permission_name for p in obj.permissions]
return result
def jsonify_user(obj):
result = jsonify_sqlobject(obj)
del result['password']
result["groups"] = [g.group_name for g in obj.groups]
result["permissions"] = [p.permission_name for p in obj.permissions]
return result
def jsonify_permission(obj):
result = jsonify_sqlobject( obj )
result["groups"] = [g.group_name for g in obj.groups]
return result
def jsonify_permission(obj):
result = jsonify_sqlobject(obj)
result["groups"] = [g.group_name for g in obj.groups]
return result
def jsonify_user(obj):
"""Convert user to JSON."""
result = jsonify_sqlobject(obj)
del result['password']
result["groups"] = [g.group_name for g in obj.groups]
result["permissions"] = [p.permission_name for p in obj.permissions]
return result
def jsonify_group(obj):
result = jsonify_sqlobject(obj)
result["users"] = [u.user_name for u in obj.users]
result["permissions"] = [p.permission_name for p in obj.permissions]
return result
def jsonify_group(obj):
result = jsonify_sqlobject( obj )
result["users"] = [u.user_name for u in obj.users]
result["permissions"] = [p.permission_name for p in obj.permissions]
return result
def jsonify_group(obj):
"""Convert group to JSON."""
result = jsonify_sqlobject(obj)
result["users"] = [u.user_name for u in obj.users]
result["permissions"] = [p.permission_name for p in obj.permissions]
return result
def jsonify_permission(obj):
"""Convert permissions to JSON."""
result = jsonify_sqlobject(obj)
result["groups"] = [g.group_name for g in obj.groups]
return result
def jsonify_group(obj):
result = jsonify_sqlobject( obj )
result["users"] = [u.user_name for u in obj.users]
result["permissions"] = [p.permission_name for p in obj.permissions]
return result