Ejemplo n.º 1
0
def delete(id):
    """
    Delete a stream. Deletes all permission documents associated with the stream
    as well.
    Parameters:
        id - a stream id.
    """
    db = core.connect()
    permIds = [perm["_id"] for perm in permission.permissionsForStream(id)]
    [permission.delete(permId) for permId in permIds]
    del db[id]
Ejemplo n.º 2
0
def deleteAllPermissions():
    permIds = [aperm["_id"] for aperm in core.query(schema.allPermissions)]
    [permission.delete(permId) for permId in permIds]
Ejemplo n.º 3
0
def deleteAllShifts():
    shiftIds = [ashift["_id"] for ashift in core.query(schema.allShifts)]
    [permission.delete(shiftId) for shiftId in shiftIds]