def delete_permission(self, group_uuid, object_uuid):
     '''
     Delete permissions for the given (group, object) pair.
     '''
     with self.engine.begin() as connection:
         connection.execute(cl_group_object_permission.delete().\
             where(cl_group_object_permission.c.group_uuid == group_uuid).\
             where(cl_group_object_permission.c.object_uuid == object_uuid)
         )
 def delete_group(self, uuid):
     '''
     Delete the group with the given uuid.
     '''
     with self.engine.begin() as connection:
         connection.execute(cl_group_object_permission.delete().\
             where(cl_group_object_permission.c.group_uuid == uuid)
         )
         connection.execute(cl_user_group.delete().\
             where(cl_user_group.c.group_uuid == uuid)
         )
         connection.execute(cl_group.delete().where(
           cl_group.c.uuid == uuid
         ))
 def delete_worksheet(self, worksheet_uuid):
     '''
     Delete the worksheet with the given uuid.
     '''
     with self.engine.begin() as connection:
         connection.execute(cl_group_object_permission.delete().\
             where(cl_group_object_permission.c.object_uuid == worksheet_uuid)
         )
         connection.execute(cl_worksheet_item.delete().where(
           cl_worksheet_item.c.worksheet_uuid == worksheet_uuid
         ))
         connection.execute(cl_worksheet.delete().where(
           cl_worksheet.c.uuid == worksheet_uuid
         ))